0
from datetime import datetime
dt = datetime.fromtimestamp(1606145709000)

I got the following error:

File "/Users/con/tests/test.py", line 14, in <module>
    dt = datetime.fromtimestamp(1606145709000)
ValueError: year 52866 is out of range

The unix timestamp '1606145709000' is from a JSON file produced by another application and it should be valid time. I tried a number of other timestamp from the file and got the same error.

What might be the cause of this?

marlon
  • 4,279
  • 6
  • 29
  • 49

0 Answers0