1、datetime
import datetime print(datetime.datetime.now())
2、time
import time otherStyleTime = time.strftime("%Y/%m/%d %H:%M:%S", time.localtime()) print(otherStyleTime)
python--时间戳
原文:https://www.cnblogs.com/lutt/p/12320775.html