使用Python 2.7,我有一个时间戳的毫秒值,例如:timestampMs 1478001612891
我想将它转换成日期格式。
我尝试过datetime.fromtimestamp(int('1478013706323'))
,但是得到了以下错误:
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
ValueError: timestamp out of range for platform localtime()/gmtime() function
year, month, day, hour=0, minute=0, second=0, microsecond=0, tzinfo=None
。 - Draconis