python datetime fromtimestamp yielding valueerror year out of range -


this question has answer here:

when attempting convert float formatted timestamp e.g 1437506779950.0 datetime object, i'm getting valueerror "year out of range".

this code used, working not 3 months ago. revisiting now, strangely throwing error yet nothing in code base has changed, data being passed it, , data has changed there timestamp.

>>> f = 1437506779950.0 >>> datetime.datetime.fromtimestamp(float(f)) traceback (most recent call last):   file "<stdin>", line 1, in <module> valueerror: year out of range 

i can't understand have changed make break?

as noted in answer this question, looks unit conversion issue. have divide timestamp 1000 convert milliseconds seconds.


Comments

Popular posts from this blog

amazon web services - S3 and apache mod_proxy with basic authentication -

How to install ruby on rails -

powershell - This solution contains one or more assemblies targeted for the global assembly cache -