mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Hmm, now that I think about it, we *can* use time.time() and 'date' if
running verbose.
This commit is contained in:
parent
4eb01cd372
commit
4c23b5fdbc
1 changed files with 8 additions and 6 deletions
|
@ -9,13 +9,15 @@ verbose = 0
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
verbose = 1
|
verbose = 1
|
||||||
|
|
||||||
now = 850499890.282 # time.time()
|
if verbose:
|
||||||
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()
|
||||||
|
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)
|
nowsecs = int(now)
|
||||||
gmt = time.gmtime(now)
|
gmt = time.gmtime(now)
|
||||||
now = time.localtime(now)
|
now = time.localtime(now)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue