[New-bugs-announce] [issue45031] [Windows] datetime.fromtimestamp(t) when t = 253402210800 fails on Python 3.8

Jan Ripke report at bugs.python.org
Fri Aug 27 10:52:22 EDT 2021


New submission from Jan Ripke <janripke at gmail.com>:

When executing the following statement on a Windows machine it fails.
On a linux machine it returns the expected date (9999-31-12 00:00:00)
The Error we get on Windows is:
OSError: [Errno 22] Invalid argument

In another manor it was reported before:
https://bugs.python.org/issue29097


The code:
from datetime import datetime

epoch_time = 253402210800000/1000
print(datetime.fromtimestamp(epoch_time))

----------
components: Windows
messages: 400429
nosy: janripke, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: [Windows] datetime.fromtimestamp(t) when t = 253402210800 fails on Python 3.8
type: crash
versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45031>
_______________________________________


More information about the New-bugs-announce mailing list