# coding:utf-8 import datetime utc_time = datetime.datetime.utcnow() # 北京时间(东八区) bj_time = (datetime.datetime.utcnow() + datetime.timedelta(hours=8)) # 美国密西根时间(西五区) us_time = (datetime.datetime.utcnow() - datetime.timedelta(hours=5)) print bj_time.strftime("%Y-%m-%d %H:%M:%S") print us_time.strftime("%Y-%m-%d %H:%M:%S")
时间: 2024-10-14 01:33:36