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 <rep...@bugs.python.org>
<http://bugs.python.org/issue29097>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to