[issue23517] datetime.utcfromtimestamp rounds results incorrectly

Alexander Belopolsky report at bugs.python.org
Mon Sep 7 15:38:47 CEST 2015


Alexander Belopolsky added the comment:

Victor> please don't revert this change.

I did not suggest reverting the entire commit.  The change that affects fromdatetime() is just

-        us = round(frac * 1e6)
+        us = int(frac * 1e6)

in datetime.py.  It is probably more involved in _datetimemodule.c, but cannot be that bad.  You can still keep pytime.c/.h.

----------

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


More information about the Python-bugs-list mailing list