Python 时间戳变成字符串

Python 时间戳变成字符串

import time
stamp = int(time.time())
time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime(stamp))
posted @ 2022-09-25 21:53  bH1pJ  阅读(240)  评论(0编辑  收藏  举报