python使用time包显示年月日的方法import time y=time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time())) print(y)