On some platforms, parse_timestamp
throws RuntimeError: Unable to calculate correct timezone offset for "-62135596800"
#4120
Labels
guidance
Question that needs advice or information.
standard-library
Bug or unintuitive behavior of the Python standard library
Describe the bug
Similar to #3642, but using
get_object
on an S3 client instance and passingIfModifiedSince=datetime.min
. I'm running inside a docker container derived from python:3.11.9 with boto3==1.34.100.When I run this container locally, I do not get the runtime error.
When I run on the same container on AWS EB + EC2, I get the runtime error.
Both systems seem to have their local timezone set to UTC.
(It seems quite possible that this is ultimately a programmer error on my part for passing
datetime.min
, but it had been working on EB+EC2 previously—possibly broken by updating to a newer OS image—and works locally, so maybe there's some issue that could be addressed through boto3 or maybe this will just be a useful note for someone else encountering the same issue in the future.)Expected Behavior
I'd expect the behavior of boto3 to be the same on both platforms and ideally to not raise the
RuntimeError
.Current Behavior
Only when running the container on the EB+EC2 instance, not when running the container locally:
Reproduction Steps
I believe that making an S3 get_object call with
IfModifiedSince=datetime.min
(withfrom datetime import datetime
) should reproduce the issue, but only on some systems.Possible Solution
No response
Additional Information/Context
No response
SDK version used
1.34.100
Environment details (OS name and version, etc.)
Linux ip-10-0-1-32.us-west-2.compute.internal 4.14.301-224.520.amzn2.x86_64 #1 SMP Fri Dec 9 09:57:03 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: