-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
Open
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
cpython on 32-bit platforms cannot handle dates beyond 2038-01-19
python3.10 -c 'import datetime; datetime.datetime.fromtimestamp(3000000000)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
OverflowError: timestamp out of range for platform time_tYour environment
- CPython versions tested on: 3.8, 3.9, 3.10
- Operating system and architecture: openSUSE-Tumbleweed 20230110 i586
This comes from
https://github.com/python/cpython/blob/8e9d08b0/Modules/_datetimemodule.c#L4982
https://github.com/python/cpython/blob/8e9d08b0/Python/pytime.c#L173
These could use __time64_t if available or we compile everything with __TIMESIZE=64
Metadata
Metadata
Assignees
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
No status