Files
weipan_cl/scripts/showtime.py
2025-02-12 11:46:33 +08:00

6 lines
266 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import datetime
timestamp = 188576635800 # 因为这是毫秒所以需要乘以1000
date_time = datetime.datetime.utcfromtimestamp(timestamp / 1000) # 转换为秒
print(f'输入时间:{timestamp} -输出时间')
print(date_time.strftime('%Y-%m-%d %H:%M:%S'))