Chinaunix首页 | 论坛 | 博客
  • 博客访问: 424263
  • 博文数量: 126
  • 博客积分: 35
  • 博客等级: 民兵
  • 技术积分: 1262
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-19 16:39
文章分类

全部博文(126)

文章存档

2017年(2)

2016年(20)

2015年(64)

2014年(24)

2013年(16)

我的朋友

分类: Python/Ruby

2015-10-23 17:04:57

fmat="%Y-%m-%d %H:%M:%S"
当前的秒:          time.time()
当前的tuple:     time.localtime()
当前的字符串:    time.strftime(fmat)

函数原型:
获取当前的秒           
秒转结构体              
结构体转秒         
结构体转字符串        
字符串转结构体        #默认的format太丑,基本不会用,所以一般都要自带format 

From To Use
seconds  in local time  
 in local time seconds
 in local time string 
string   in local time 

阅读(677) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~