-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Timestamp out of range error for certificate that expires in 2049 (beyond the 2038 epoch time overflow) #2564
Comments
The epoch overflow issue seems like it can be addressed by a method described here. https://stackoverflow.com/questions/65481616/python-overflowerror-creating-date-from-timestamp-in-32bit-system#answer-65494704 After replacing
I suggest a solution along these lines to support a broader range of dates. |
Hi @Rich-Nelson, Sorry to hear about the issues. I'm not sure if we can go that route in terms of a fix, but I'll review with the team to get their thoughts. |
Hi @Rich-Nelson, I thought this looked familiar— We had this come up earlier this year in this issue. This is somewhat outside of our control, but the team is open to adding some additional logic to work around this. |
Closing as #2972 was merged, please create a new issue if still seeing the error. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
I'm getting a
ValueError: timestamp out of range for platform time_t
error when trying to delete an IoT Thing certificate with an expiration date in 2049.Since the timestamp is 2524607999 and EPOCH time overflows at 2147483647 (the year 2038). The timestamp conversion function
datetime.datetime.fromtimestamp
is throwing an error.Steps to reproduce
I'm using the SwetupAWS.py tool in Amazon-FreeRTOS.
Running the with the args
delete_prereq
for a thing with a certificate ending beyond 2038 will produce the error.Expected behavior
Expecting that the timestamp can parse properly, so that info about the cert can be returned and it can be deleted.
Debug logs
I did my best to include the relevant portions without including any compromising information.
The text was updated successfully, but these errors were encountered: