-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
Closed as duplicate of#81708
Labels
OS-windowsextension-modulesC modules in the Modules dirC modules in the Modules dirstdlibStandard 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
Hi,
i found few similar bugs but all of them seems to be closed in older versions of python.
On windows (10, 64b) I get an OSError if I try to get timestamp from datetime.datetime object for some dates:
>>> datetime.datetime(year=2021, month=11, day=13).timestamp()
1636758000.0
>>> datetime.datetime(year=3021, month=11, day=13).timestamp()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument
>>> datetime.datetime(year=1021, month=11, day=13).timestamp()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument
>>> sys.version
'3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit (AMD64)]'
>>>
Metadata
Metadata
Assignees
Labels
OS-windowsextension-modulesC modules in the Modules dirC modules in the Modules dirstdlibStandard 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