使用
datetime模块:
from datetime import datetimets = int("1284101485")# if you encounter a "year is out of range" error the timestamp# may be in milliseconds, try `ts /= 1000` in that caseprint(datetime.utcfromtimestamp(ts).strftime('%Y-%m-%d %H:%M:%S'))
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)