From d8ce0c149f10d841dc19cbc32c8fc844aa4d65fb Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Fri, 25 Nov 2016 14:37:03 +0100 Subject: Do import datetime. How did this ever work? --- tools/fetchallcerts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools') 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) -- cgit v1.1