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
This is a continuation of a92c838 beware python/cpython#101069 : This currently breaks on i586 with File "/usr/lib/python3.8/email/utils.py", line 147, in formatdate dt = datetime.datetime.fromtimestamp(timeval, datetime.timezone.utc) OverflowError: timestamp out of range for platform time_t probably from https://github.com/python/cpython/blob/8e9d08b0/Modules/_datetimemodule.c#L4982
|
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. |
Co-Authored-By: Mariusz Felisiak This is a continuation of a92c838 To avoid triggering python/cpython#101069 we do not yet set expiration after 2038, but just one year ahead.
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=64The text was updated successfully, but these errors were encountered: