python 时间戳转为格式化时间

  • Post author:
  • Post category:python


import time

def dtchg(x):

time_local = time.localtime(x)

dt = time.strftime(“%Y-%m-%d %H:%M:%S”,time_local)

return dt



版权声明:本文为coolkid09100原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。