[issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

Ammar Askar report at bugs.python.org
Fri Dec 30 06:08:44 EST 2016


Ammar Askar added the comment:

I've attached two patches that fix this behavior, one by simply foregoing the fold detection for this time range on windows (the patch that I'd argue is simpler and more readable)

And one that truncates the passed values to local to not be negative. This one would have been simple but unfortunately there's the complication that there are two local calls and additionally, the second one cannot be truncated to exactly 0 because then we incorrectly detect a fold for the timestamp 0.

----------
keywords: +patch
Added file: http://bugs.python.org/file46091/forego_fold_detection.patch

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


More information about the Python-bugs-list mailing list