I have some code for converting some timestamps stored as strings into datetime objects and noticed today exceptions when it converts dates with an int timestamp value greater than the max int.
datetime.datetime.fromtimestamp(2147570047)
for example gives me
ValueError: timestamp out of range for platform time_t
How can I get around this problem? assuming that I want to stay on 32-bit python (running 2.7.2)
I noticed I can convert the max int into the datetime object then add on any extra with timedeltas but I couldn't think of a particularly efficient or nice way of doing this in practice. What's a good way I can convert these 2038+ timestamps into datetime objects?