常用
# float 整数位为秒
time.time()
# struct_time
time.localtime()
# string
time.ctime()
# string
time.asctime()
转换
# struct_time
time.localtime(float)
# float
time.mktime(struct_time)
# struct_time
time.strptime(string, "%Y-%m-%d %H:%M:%S")
# string
time.strftime("%Y-%m-%d")
标签:-%,string,Python,float,模块,time,struct
From: https://www.cnblogs.com/congxinglong/p/17453706.html