特别感谢:https://cloud.tencent.com/developer/article/1571295?from=information.detail.python%E6%AF%AB%E7%A7%92%E8%BD%AC%E6%8D%A2
今天工程碰见一个问题,需要将毫秒转换成日期
#!-*- coding:UTF-8 -*-
'''
Created on 2015-4-14
'''
import datetime
import time
timeStamp = 1427349630000
timeStamp /= 1000.0
print timeStamp
timearr = time.localtime(timeStamp)
otherStyleTime = time.strftime("%Y-%m-%d %H:%M:%S", timearr)
print otherStyleTime