Python时间戳转为特定格式时间

Python时间戳转为特定格式时间

# -*- coding:utf-8 -*-
import time
def stime():
    timeStamp = 当前时间戳整数
    timeArray = time.localtime(timeStamp)
    otherStyleTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
    print(otherStyleTime)

猜你喜欢

转载自blog.csdn.net/ithongchou/article/details/83311084
今日推荐