pythondatetimepython-arrow

Time zone for china not working in python arrow


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')

So, the first two statements work, but the remaining 3 which are trying to convert time to China time do not. How do I fix this?


Solution

  • Try using Asia/Shanghai or zh-cn as a timezones string.