【发布时间】:2017-03-26 23:14:25
【问题描述】:
arrow.get('2016-01-01')
arrow.get(datetime.now(), 'US/Pacific')
arrow.get(datetime.now(), 'China')
arrow.get(datetime.now(), 'CT')
arrow.get(datetime.now(), 'CST')
因此,前两个语句有效,但其余 3 个试图将时间转换为中国时间的语句无效。我该如何解决这个问题?
【问题讨论】:
-
根据 arrow.readthedocs.io/en/latest 的 Arrow 文档,Arrow 使用 tz 数据库中的时区名称。这些名字可以在en.wikipedia.org/wiki/List_of_tz_database_time_zones找到
标签: python datetime python-arrow