startTime='2017-07-07 12:00:00'
starttimeArray= time.strptime(startTime, "%Y-%m-%d %H:%M:%S")
startTimeStamp = int(time.mktime(starttimeArray))
print startTimeStamp #时间戳
startTime='2017-07-07 12:00:00'
starttimeArray= time.strptime(startTime, "%Y-%m-%d %H:%M:%S")
startTimeStamp = int(time.mktime(starttimeArray))
print startTimeStamp #时间戳
本文标题:python 时间戳转换
本文链接:https://www.haomeiwen.com/subject/pszxzftx.html
网友评论