东部标准时间是-5(到UTC)
东部夏令时为-4(至UTC)
那么为什么这不能正常工作?
>>> import datetime, pytz
# 5 hour difference during Eastern Standard Time
>>> datetime.datetime(2018, 1, 25, 16, 26, tzinfo=pytz.timezone('US/Eastern')).hour
>>> 16
>>> datetime.datetime(2018, 1, 25, 16, 26, tzinfo=pytz.timezone('US/Eastern')).astimezone(pytz.utc).hour
>>> 21
# 4 hour difference during Eastern Daylight Time
>>> datetime.datetime(2018, 4, 25, 16, 26, tzinfo=pytz.timezone('US/Eastern')).hour
>>> 16
# So why does this not say 20?
>>> datetime.datetime(2018, 4, 25, 16, 26, tzinfo=pytz.timezone('US/Eastern')).astimezone(pytz.utc).hour
>>> 21