Sounds like Unix time, but with milliseconds instead of seconds?
>>> import time
>>> time.gmtime(1267488000000 / 1000)
time.struct_time(tm_year=2010, tm_mon=3, tm_mday=2, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=1, tm_yday=61, tm_isdst=0)
March 2, 2010?
And if you want an object datetime:
>>> import datetime
>>> datetime.datetime.fromtimestamp(1267488000000 / 1000)
datetime.datetime(2010, 3, 1, 19, 0)
Note that it datetimeuses the local time zone, and time.struct_timeUTC.
source
share