码迷,mamicode.com
首页 > 其他好文 > 详细

time模块 转换关系图

时间:2018-05-10 19:32:06      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:truck   模块   div   .com   none   class   import   time   图片   

技术分享图片

 

import time


t = time.time() #获取目前时间

t_struck = time.localtime(t)  #time.gmtime()  utc时区

t_str = time.strftime(%Y-%m-%d %H %M %S,t_struck)#从struck转化成年月日

t_struck2 = time.strptime(2017-05-06,%Y-%m-%d) #转化struck模式

t2 = time.mktime(t_struck2)  #转化成时间戳

print(t,t_struck ,t_str,t_struck2,t2)

 

time模块 转换关系图

标签:truck   模块   div   .com   none   class   import   time   图片   

原文地址:https://www.cnblogs.com/yelublue/p/9021038.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!