[issue30684] datetime.fromtimestamp raises OSError on first day after epoch on Windows

Christoph Reiter report at bugs.python.org
Fri Jun 16 08:55:21 EDT 2017


New submission from Christoph Reiter:

I'm not sure this is a bug since the docs says raising OSError is allowed, but it looks weird to me.

On Windows.

Using Python 3.4:

>>> datetime.datetime.fromtimestamp(0)
datetime.datetime(1970, 1, 1, 1, 0)

Using Python 3.6.1:

>>> datetime.datetime.fromtimestamp(0)
OSError: [Errno 22] Invalid argument

The first time stamp which works with 3.6 is 86400, so exactly the next day.

----------
messages: 296191
nosy: lazka
priority: normal
severity: normal
status: open
title: datetime.fromtimestamp raises OSError on first day after epoch on Windows
versions: Python 3.6

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


More information about the Python-bugs-list mailing list