Python获取文件创建时间
import datetime
import os
import time
t = os.path.getmtime('b.json')
timeStruce = time.localtime(t)
times = time.strftime('%Y-%m-%d %H:%M:%S', timeStruce)
print(times)
import datetime
import os
import time
t = os.path.getmtime('b.json')
timeStruce = time.localtime(t)
times = time.strftime('%Y-%m-%d %H:%M:%S', timeStruce)
print(times)