发布时间:2022-08-09 文章分类:编程知识 投稿人:赵颖 字号: 默认 | | 超大 打印
python datetime fromtimestamp
2010-09-17 11:45
import datetime

import time

>>> datetime.datetime.fromtimestamp(1284692703)

datetime.datetime(2010, 9, 17, 11, 5, 3)

>>> datetime.datetime.fromtimestamp(time.time())

datetime.datetime(2010, 9, 17, 11, 1, 31, 680000)