add proper time formatting
authorAndrew Engelbrecht <sudoman@ninthfloor.org>
Sun, 27 Jul 2014 04:44:30 +0000 (00:44 -0400)
committerAndrew Engelbrecht <sudoman@ninthfloor.org>
Mon, 7 Dec 2015 17:46:47 +0000 (12:46 -0500)
sig time stamps are now printed using the strftime() function. it prints
a time format like gpg.

edward-bot

index d2dc0923d4424070441f0d18f0ad44f643030597..784767ad0ddb58523c28bf5f116a6c719d6c927a 100755 (executable)
@@ -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 + ">")