python代码中指定时区获取时间方法

Posted on 2016-04-14 11:17  NooBkey  阅读(791)  评论(0编辑  收藏  举报

os.environ['TZ'] = 'Asia/Shanghai'

os.environ['TZ'] = 'Europe/London'
hour_cur = time.strftime('%H')

Copyright © 2024 NooBkey
Powered by .NET 9.0 on Kubernetes