[issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6
Pekka Klärck
report at bugs.python.org
Wed Dec 28 15:49:20 EST 2016
New submission from Pekka Klärck:
For example:
E:\>py -3.6 -c "import datetime; datetime.datetime.fromtimestamp(42)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
OSError: [Errno 22] Invalid argument
Works fine at least with Python 2.6-2.7 and 3.3-3.5. Only tested on Windows (missing deadsnakes for easy Linux testing).
I was also surprised to get OSError in general, but apparently fromtimestamp uses that instead of ValueError nowadays in some error situations.
----------
messages: 284199
nosy: pekka.klarck
priority: normal
severity: normal
status: open
title: datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6
versions: Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29097>
_______________________________________
More information about the Python-bugs-list
mailing list