STINNER Victor added the comment:

Ok, I fixed Python 3.4 and 3.5 too: fromtimestamp() and utcfromtimestamp() now 
uses also ROUND_HALF_EVEN rounding mode, as timedelta constructor. I explained 
in Misc/NEWS that the change was made to respect the property:

(datetime(1970,1,1) + timedelta(seconds=t)) == datetime.utcfromtimestamp(t)

Thanks Alexander Belopolsky & Tim Peters for your explanation on rounding. It's 
not a simple problem :-)

Thanks Tommaso Barbugli for the bug report: it's now fixed on all (maintained) 
Python 3 versions: 3.4, 3.5 and 3.6. The fix will be part of Python 3.5.1.

----------
versions: +Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23517>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to