summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_strftime.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1996-12-13 18:08:58 (GMT)
committerBarry Warsaw <barry@python.org>1996-12-13 18:08:58 (GMT)
commit4c23b5fdbcb48cc1254035e8947e447aad4518cf (patch)
treefed23c0a5558dcaf90dada8f15746fc93f95cc01 /Lib/test/test_strftime.py
parent4eb01cd37292ede5608e5b0f9c2fdbc5007a0e9a (diff)
downloadcpython-4c23b5fdbcb48cc1254035e8947e447aad4518cf.zip
cpython-4c23b5fdbcb48cc1254035e8947e447aad4518cf.tar.gz
cpython-4c23b5fdbcb48cc1254035e8947e447aad4518cf.tar.bz2
Hmm, now that I think about it, we *can* use time.time() and 'date' if
running verbose.
Diffstat (limited to 'Lib/test/test_strftime.py')
-rwxr-xr-xLib/test/test_strftime.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/Lib/test/test_strftime.py b/Lib/test/test_strftime.py
index 288162c..28ae4c6 100755
--- a/Lib/test/test_strftime.py
+++ b/Lib/test/test_strftime.py
@@ -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)