1111111111

Mar. 17th, 2005 08:59 pm
moon_aka_sun: (Default)
[personal profile] moon_aka_sun
>>> from time import *
>>> while 'till ^C':
...   sleep(1); print int(time()), strftime( "%Y-%m-%d %X" )
...
1111111107 2005-03-17 20:58:27
1111111108 2005-03-17 20:58:28
1111111109 2005-03-17 20:58:29
1111111110 2005-03-17 20:58:30
1111111111 2005-03-17 20:58:31
1111111112 2005-03-17 20:58:32
1111111113 2005-03-17 20:58:33
1111111114 2005-03-17 20:58:34
>>> def T(t): return strftime( "%Y-%m-%d %X", gmtime(t) )
...
>>> for t in (10**9,2**30,1111111111,1122334455,1234567890,2**31-1):print t,T(t)
...
1000000000 2001-09-09 01:46:40 # all times are GMT
1073741824 2004-01-10 13:37:04 # 2**30
1111111111 2005-03-18 01:58:31
1122334455 2005-07-25 23:34:15
1234567890 2009-02-13 23:31:30
2147483647 2038-01-19 03:14:07 # 2**31-1 -- last unix second

>>> from MyDate import *
>>> print special_fmt(j2ymdhms(ut2j(2**32-1)))
4294967295 2106-02-07 06:28:15 # 2**32-1 -- unsigned time
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

December 2016

S M T W T F S
    123
4 5678910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 27th, 2025 08:00 pm
Powered by Dreamwidth Studios