We have a functionality where we want to convert epoch to datetime objects and format them as strings in python. Moreover, we also want to convert the out-of-range epochs as datetime and format them back as a string. However, the python datetime object doesn't support large dates such as 429790838400 which would format to 13/07/15589 date.
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> dt = datetime.fromtimestamp(429790838400)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: year 15589 is out of range
Can someone please guide us on how to achieve this?