diff options
author | Linus Nordberg <linus@nordu.net> | 2016-11-25 14:37:03 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2016-11-25 14:37:03 +0100 |
commit | d8ce0c149f10d841dc19cbc32c8fc844aa4d65fb (patch) | |
tree | cb1e56ab0fb0a016b98275d5c482e94d36c75fd2 /tools | |
parent | e133280625b4f3214ab1c792bd0fb511e0dcfb2d (diff) |
Do import datetime.
How did this ever work?
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/fetchallcerts.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/fetchallcerts.py b/tools/fetchallcerts.py index 66fde74..f9c2683 100755 --- a/tools/fetchallcerts.py +++ b/tools/fetchallcerts.py @@ -17,6 +17,7 @@ from certtools import * import zipfile import os import time +from datetime import datetime parser = argparse.ArgumentParser(description='') parser.add_argument('baseurl', help="Base URL for CT server") @@ -60,7 +61,7 @@ try: except IOError: oldsth = None -sth_timestamp = datetime.datetime.fromtimestamp(sth["timestamp"]/1000) +sth_timestamp = datetime.fromtimestamp(sth["timestamp"]/1000) since_timestamp = time.time() - sth["timestamp"]/1000 print "Log last updated %s, %d seconds ago" % (sth_timestamp.ctime(), since_timestamp) |