From: Andrew Engelbrecht Date: Sun, 27 Jul 2014 04:44:30 +0000 (-0400) Subject: add proper time formatting X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5ea088f53f9a8931e4a7b1b870f85a44b35eeee4;p=edward.git add proper time formatting sig time stamps are now printed using the strftime() function. it prints a time format like gpg. --- 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 + ">")