[docs] [issue10938] Undocumented option for datetime.strftime: %s

Humberto Diogenes report at bugs.python.org
Tue Jan 18 20:26:19 CET 2011

New submission from Humberto Diogenes <humberto at digi.com.br>:

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')

assignee: docs at python
components: Documentation
messages: 126481
nosy: docs at python, hdiogenes
priority: normal
severity: normal
status: open
title: Undocumented option for datetime.strftime: %s
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the docs mailing list