from datetime import datetime,timedelta import time t = time.localtime() #<class 'time.struct_time'> now = time.strftime('%Y%m%d%H%M%S',t) #str time.sleep(2) t2 = time.localtime() now2 = time.strftime('%Y%m%d%H%M%S',t2) #str start = datetime.fromtimestamp(time.mktime(time.strptime(now,'%Y%m%d%H%M%S'))) #<class 'datetime.dat
python 时间间隔判断
最新推荐文章于 2024-04-12 14:20:01 发布