[issue23517] datetime.utcfromtimestamp rounds results incorrectly

STINNER Victor report at bugs.python.org
Sat Sep 5 00:34:49 CEST 2015


STINNER Victor added the comment:

> My opinions haven't changed:  nearest/even is unnatural for rounding times ("sometimes up, sometimes down" grates against the nature of monotonically non-decreasing timestamps),

By the way, why does Python use ROUND_HALF_EVEN for round()? It also feels unnatural to me!

>>> round(0.5)
0
>>> round(1.5)
2

----------

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


More information about the Python-bugs-list mailing list