1. time时间戳(10位) import time t = int ( time . time ()) # 1326428326 2. time时间戳(13位) import time t = round(time.time()*1000) #1694609388318 3. 对time时间戳转为为字符串 import time t = round(time.time()*1000)
1. time时间戳(10位)
import timet = int(time.time()) # 1326428326
2. time时间戳(13位)
import timet = round(time.time()*1000) #1694609388318
3. 对time时间戳转为为字符串
import timet = round(time.time()*1000)
t_str = time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(t/1000))