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

Ammar Askar report at bugs.python.org
Thu Dec 29 09:15:05 EST 2016


Ammar Askar added the comment:

Can recreate successfully on windows, but not on linux:

> C:\Python36\python.exe -c "import datetime; datetime.datetime.fromtimestamp(42)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
OSError: [Errno 22] Invalid argument

> C:\Python36\python.exe
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime; datetime.datetime.fromtimestamp(42)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument

----------
nosy: +ammar2

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


More information about the Python-bugs-list mailing list