#Author wangmengzhu import time print(time.time())#时间戳 print(time.strftime('%Y-%m-%d %X'))#结构化时间 print(time.localtime())##元组形式表示的时间 print(time.localtime().tm_mon) print(time.localtime(1233311331)) print(time.gmtime(31133)) print(time.mktime(time.localtime())) print(time.strftime('%Y',time.localtime())) print(time.strftime('%Y',time.gmtime())) print(time.strptime('2017','%Y')) print(time.ctime()) print(time.asctime()) print(time.ctime(313113313))#时间戳形式表示的时间 print(time.asctime(time.gmtime()))##结构化的时间