-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed as not planned
Closed as not planned
Copy link
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
In Windows 10 for a datetime.datetime class if the year value is greater than 3001, then the timestamp() method returns invalid argument error.
File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument
Reproducible example
>>> from datetime import datetime
>>> max_time = datetime(year=9000,month=1,day=1,hour=0,minute=0,second=0)
>>> max_time.timestamp()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument
>>>Your environment
- CPython versions tested on: Python 3.11.3
- Operating system and architecture: Windows 10, 64bit
Python 3.11.3 (tags/v3.11.3:f3909b8, Apr 4 2023, 23:49:59) [MSC v.1934 64 bit (AMD64)] on win32
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
Done

