[issue23607] Inconsistency in datetime.utcfromtimestamp(Decimal)
Paul Ganssle
report at bugs.python.org
Wed Feb 27 11:53:12 EST 2019
Paul Ganssle <p.ganssle at gmail.com> added the comment:
I'm not sure if either of these patches got merged, but at some point this was fixed:
Python 3.7.2 (default, Feb 9 2019, 13:18:43)
[GCC 8.2.1 20181127] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> from decimal import Decimal
>>> datetime.utcfromtimestamp(Decimal(123456.0))
datetime.datetime(1970, 1, 2, 10, 17, 36)
I recommend that someone add some regression tests to this, then we can close the issue.
I'm also going to mark this as "easy" since adding tests for this particular example should be pretty simple.
----------
keywords: +easy
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue23607>
_______________________________________
More information about the Python-bugs-list
mailing list