Message126481
On some systems, datetime.strftime() accepts a %s format string that returns epoch / UNIX timestamp, but this behavior is not documented at http://docs.python.org/library/datetime.html
Python 2.7 (r27:82508, Jul 3 2010, 21:12:11)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.datetime.now().strftime('%s')
'1295376929' |
|
Date |
User |
Action |
Args |
2011-01-18 19:26:19 | hdiogenes | set | recipients:
+ hdiogenes, docs@python |
2011-01-18 19:26:19 | hdiogenes | set | messageid: <1295378779.48.0.643087757109.issue10938@psf.upfronthosting.co.za> |
2011-01-18 19:26:13 | hdiogenes | link | issue10938 messages |
2011-01-18 19:26:13 | hdiogenes | create | |
|