I'm working with a 32-bit version of Raspberry Pi OS and I'm curious about the Year 2038 problem. I have this piece of code that converts epoch time to a readable date:
`datetime.fromtimestamp(date_epoch).strftime("%A, %d.%m.%Y")`
I want to know if this will still generate the correct date after the epoch time hits 2,147,483,647, which corresponds to 03:14:07 UTC on January 19, 2038. Is Python 3.11.2 safe to use for this, and are there any specific versions of Python that can handle this issue? Or is it simply not feasible on 32-bit Raspbian OS? I came across some discussions indicating that Python is safe until the year 10,000, but what's the current situation regarding this bug?
2 Answers
Did you consider trying out the code linked in that GitHub issue for consistency? It might give you a better idea of how it performs.
Just change the date in your tests and see what happens! It's really the best way to find out for sure how your code behaves.
Related Questions
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically
[Centos] Delete All Files And Folders That Contain a String