]> granicus.if.org Git - python/commitdiff
Hmm, now that I think about it, we *can* use time.time() and 'date' if
authorBarry Warsaw <barry@python.org>
Fri, 13 Dec 1996 18:08:58 +0000 (18:08 +0000)
committerBarry Warsaw <barry@python.org>
Fri, 13 Dec 1996 18:08:58 +0000 (18:08 +0000)
running verbose.

Lib/test/test_strftime.py

index 288162cb80887a73911c554e76a2bafba9e989ed..28ae4c64a7199ec373fc9f9b4471dfc696f368e8 100755 (executable)
@@ -9,13 +9,15 @@ verbose = 0
 if __name__ == '__main__':
     verbose = 1
 
-now = 850499890.282                      # time.time()
-fromdate = 'Fri Dec 13 12:58:10 EST 1996' # os.popen('date')
+if verbose:
+    now = time.time()
+    fp = os.popen('date')
+    fromdate = string.strip(fp.readline())
+    fp.close()
+else:
+    now = 850499890.282                              # time.time()
+    fromdate = 'Fri Dec 13 12:58:10 EST 1996' # os.popen('date')
 
-## now = time.time()
-## fp = os.popen('date')
-## fromdate = string.strip(fp.readline())
-## fp.close()
 nowsecs = int(now)
 gmt = time.gmtime(now)
 now = time.localtime(now)