Python time gmtime()方法
Python 教程
· 2019-02-03 11:41:35
描述
Python time gmtime() 函数将一个时间戳转换为UTC时区(0时区)的struct_time,可选的参数sec表示从1970-1-1以来的秒数。其默认值为time.time(),函数返回time.struct_time类型的对象。(struct_time是在time模块中定义的表示时间的对象)。
语法
gmtime()方法语法:
time.gmtime([ sec ])
参数
- sec -- 转换为time.struct_time类型的对象的秒数。
返回值
该函数没有任何返回值。
实例
以下实例展示了 gmtime() 函数的使用方法:
#!/usr/bin/python import time print "time.gmtime() : %s" % time.gmtime()
以上实例输出结果为:
time.gmtime() : time.struct_time(tm_year=2016, tm_mon=4, tm_mday=7, tm_hour=2, tm_min=55, tm_sec=45, tm_wday=3, tm_yday=98, tm_isdst=0)
点击查看所有 Python 教程 文章: https://www.codercto.com/courses/l/8.html
Coming of Age in Second Life
Tom Boellstorff / Princeton University Press / 2008-04-21 / USD 29.95
The gap between the virtual and the physical, and its effect on the ideas of personhood and relationships, is the most interesting aspect of Boellstorff's analysis... Boellstorff's portrayal of a virt......一起来看看 《Coming of Age in Second Life》 这本书的介绍吧!