标签:strftime python color keyword %s bsp cal 毫秒级 pre
python
1 import time 2 3 # 秒级时间戳 4 print(int(time.time())) 5 # 1593748100 6 7 # 毫秒级时间戳 8 print(int(time.time() * 1000)) 9 # 1593748100746 10 11 # 用户友好的秒级时间戳 12 print(time.strftime("%Y%m%d%H%M%S", time.localtime(int(time.time())))) 13 # 20200703114820
标签:strftime python color keyword %s bsp cal 毫秒级 pre
原文地址:https://www.cnblogs.com/jade-north/p/13229477.html