摘要:
查看 阅读全文
posted @ 2019-01-04 12:40
anobscureretreat
阅读(1299)
评论(0)
推荐(0)
摘要:
#!/usr/bin/python # -*- coding: UTF-8 -*- import time import calendar """ 时间元组(年、月、日、时、分、秒、一周的第几日、一年的第几日、夏令时) 一周的第几日: 0-6 一年的第几日: 1-366 夏令时: -1, 0, 1 """ """ pyt... 阅读全文
posted @ 2019-01-04 11:29
anobscureretreat
阅读(195)
评论(0)
推荐(0)
摘要:
>>> print(time.strptime('2018-9-30 11:32:23', '%Y-%m-%d %H:%M:%S')) time.struct_time(tm_year=2018, tm_mon=9, tm_mday=30, tm_hour=11, tm_min=32, tm_sec=23, tm_wday=6, tm_yday=273, tm_isdst=-1) 阅读全文
posted @ 2019-01-04 11:26
anobscureretreat
阅读(686)
评论(0)
推荐(0)
摘要:
>>> time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) '2019-01-04 11:20:25' 阅读全文
posted @ 2019-01-04 11:23
anobscureretreat
阅读(256)
评论(0)
推荐(0)
摘要:
>>> import time >>> time.asctime() 'Fri Jan 4 11:17:20 2019' >>> time.asctime((2018, 9, 30, 9, 44, 31, 6, 273, 0)) 'Sun Sep 30 09:44:31 2018' >>> time.asctime(time.localtime(1538271871.226226)) 'S... 阅读全文
posted @ 2019-01-04 11:19
anobscureretreat
阅读(399)
评论(0)
推荐(0)
摘要:
输出 阅读全文
posted @ 2019-01-04 11:17
anobscureretreat
阅读(324)
评论(0)
推荐(0)
摘要:
输出 阅读全文
posted @ 2019-01-04 11:06
anobscureretreat
阅读(12736)
评论(0)
推荐(0)
摘要:
#!/usr/bin/python # -*- coding: UTF-8 -*- import time localtime = time.asctime( time.localtime(time.time()) ) print("本地时间为 :", localtime) 输出: 本地时间为 : Thu Apr 7 10:05:21 2016 阅读全文
posted @ 2019-01-04 10:51
anobscureretreat
阅读(212)
评论(0)
推荐(0)
摘要:
#!/usr/bin/python # -*- coding: UTF-8 -*- import time localtime = time.localtime(time.time()) print("本地时间为 :", localtime) 输出: 本地时间为 : time.struct_time(tm_year=2016, tm_mon=4, tm_mday=7, tm_hour=... 阅读全文
posted @ 2019-01-04 10:48
anobscureretreat
阅读(707)
评论(0)
推荐(0)
摘要:
#!/usr/bin/python # -*- coding: UTF-8 -*- import time; # 引入time模块 ticks = time.time() print("当前时间戳为:", ticks) 输出: 当前时间戳为: 1459994552.51 阅读全文
posted @ 2019-01-04 10:42
anobscureretreat
阅读(625)
评论(0)
推荐(0)

浙公网安备 33010602011771号