-
-
Notifications
You must be signed in to change notification settings - Fork 31k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
datetime does not support timestamps after 2038 on 32-bit #101069
Comments
It works on my machine (macOS 10.14) on
The same for
I don"t say that this is not a bug, I say that this is totally system-specific. |
Is your system 32bit? I doubt it with Mac. |
No, it is 64 bit |
Then your comment is unfortunately irrelevant. |
@mcepl yeap, that"s what I said :)
|
I guess, this could be solved outside of python by rebuilding our 32-bit Linuxes with So that their (or glibc"s) time_t would have 8 bytes. |
I came across this issue as well on my raspberry pi"s Cortex A7 (32-bit CPU). Two remarks: This works until year 10000 everywhere (incl. 32bit), buying us some extra time:
The Y10K problem here is still a limitation if you want to handle timestamps in the (distant) future. I know they said 2000 was far away and it came, I know they said 2038 was far away and now it"s at our door, but Y10K feels sufficiently far away for representing the current time of reality (it will cause problems in Y30K science-fiction — and yes, I"m not too happy when the SF program that ran fine on my laptop crashes on my raspberry pi). I found a heterogenous mix of errors when going past year 9999:
Okay, enough goofing around, let"s get to the second remark:
None of the Y10K bug, D1G bug ( a Python original) or "C int" shenanigans that we saw with Python above. Maybe Perl is enough of a low bar that it"s not egregious to say that Python"s time library is antiquated, buggy, and in need of an urgent fix. Important: I"m not demanding anyone volunteer to fix this; however I do seek unmitigated agreement that it"s indeed Python"s |
AFAIU, the problem originates in glibc"s |
Bug report
cpython on 32-bit platforms cannot handle dates beyond 2038-01-19
Your environment
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
The text was updated successfully, but these errors were encountered: