import time 三种结构:时间戳,字符串,struct_time
time.time() 当下时间戳
time.local(时间戳) 时间戳 -> 当地时区的struct_time
time.strptime(‘2018-10-07’, ‘%Y-%m-%d’) 字符串 -> strcut_time
time.strftime(’%Y-%m-%d’, struct_time) struct_time -> 字符串
import time 三种结构:时间戳,字符串,struct_time
time.time() 当下时间戳
time.local(时间戳) 时间戳 -> 当地时区的struct_time
time.strptime(‘2018-10-07’, ‘%Y-%m-%d’) 字符串 -> strcut_time
time.strftime(’%Y-%m-%d’, struct_time) struct_time -> 字符串