美文网首页
Python 获取时间戳

Python 获取时间戳

作者: 忆卿 | 来源:发表于2017-03-23 16:02 被阅读189次

import datetime

import time

print time.mktime(datetime.datetime.now().timetuple())

Unix timestamp :是从 1970 年 1 月 1 日(UTC/GMT 的午夜)开始所经过的秒数,不考虑闰秒

相关文章

网友评论

      本文标题:Python 获取时间戳

      本文链接:https://www.haomeiwen.com/subject/idxtottx.html