[issue12750] datetime.strftime('%s') should respect tzinfo

Alexander Belopolsky report at bugs.python.org
Sun Jun 29 20:09:55 CEST 2014


Alexander Belopolsky added the comment:

Here is the simpler demonstration of the "floor" behavior on Linux:

>>> from datetime import datetime
>>> datetime.fromtimestamp(-0.1).strftime('%s')
'-1'
>>> datetime.fromtimestamp(-1.1).strftime('%s')
'-2'
>>> datetime.fromtimestamp(0.1).strftime('%s')
'0'
>>> datetime.fromtimestamp(1.1).strftime('%s')
'1'

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12750>
_______________________________________


More information about the Python-bugs-list mailing list