import time;
import datetime
ticks1=time.time()
print("当前时间段:",ticks1)
localtime=time.localtime(time.time())
print("当前详细地区时间:",localtime)
now_time=time.asctime(time.localtime(time.time()))
print("现在的时间为的时间为:",now_time)
import time
print(time.strftime('%y-%m-%d %H:%M:%S',time.localtime()))
print(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))
print(time.strftime("%Y %A %a %b %B %H:%M:%S", time.localtime()))
a = "Sat Mar 28 22:24:24 2016"
q ="2019-11-26 17:32:03"
print(time.mktime(time.strptime(a, "%a %b %d %H:%M:%S %Y")))
import datetime
time1 = datetime.datetime.strptime('2019/07/04 14:47', '%Y/%m/%d %H:%M')
time2 =(time.strftime("%a %b %d %H:%M:%S %Y", time.localtime()))
time3 =(time.strftime("%Y-%m-%d %H:%M:%S",time.localtime()))
time4=(datetime.datetime.now())
print(type(time1), time1)
print('time2时间为:',time2)
print('time3时间为:',time3)
print('time4的时间为:',time4)
import calendar
cal = calendar.month(2016, 2)
print ("以下输出2016年1月份的日历:" )
print (cal)
import datetime
datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")