From 5ea088f53f9a8931e4a7b1b870f85a44b35eeee4 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Sun, 27 Jul 2014 00:44:30 -0400 Subject: [PATCH] add proper time formatting sig time stamps are now printed using the strftime() function. it prints a time format like gpg. --- edward-bot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edward-bot b/edward-bot index d2dc092..784767a 100755 --- a/edward-bot +++ b/edward-bot @@ -112,7 +112,7 @@ def print_sig (sig): #continue fpr = sig.fpr - utc = time.gmtime(sig.timestamp) + timestamp = time.localtime(sig.timestamp) g = gpgme.Context() key = g.get_key(fpr) @@ -121,7 +121,7 @@ def print_sig (sig): e_addr = key.uids[0].email comment = key.uids[0].comment - date = "{0:0>4}-{1:0>2}-{2:0>2} {3}:{4}:{5} UTC".format(*utc) + date = time.strftime("%a %d %b %Y %I:%M:%S %p %Z", timestamp) print("sig from: " + name + " (" + comment + ") <" \ + e_addr + ">") -- 2.25.1