import time print(time.time())#获当前时间的时间戳 print(time.localtime())#获取本地时间 print(time.strftime('%Y-%m-%d',time.localtime()))#时间格式化 -----------运行结果--------------------------- 1565681079.7931128 time.struct_time(tm_year=2019, tm_mon=8, tm_mday=13, tm_hour…