Python将时间戳转换为实际时间的方法

Python将时间戳转换为实际时间的方法

import time
#44777为时间戳
timeStamp = 44777

timeArray = time.localtime(timeStamp)

otherStyleTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)

print(otherStyleTime)

你可能感兴趣的:(解决问题,python)