Python_报错:TypeError: Tuple or struct_time argument required.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| import time
ts = time.time()
local = time.localtime(ts)#转换成时间元祖
format_time=time.strftime("%Y-%m-%d %H:%M:%S", local)
localtime = time.asctime(local)
print(format_time)
print(localtime)
|