Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #104821

Missing something about timezones

From Skip Montanaro <skip.montanaro@gmail.com>
Newsgroups comp.lang.python
Subject Missing something about timezones
Date 2016-03-14 10:19 -0500
Message-ID <mailman.103.1457968773.12893.python-list@python.org> (permalink)

Show all headers | View raw


Is this correct (today, with Daylight Savings in effect)?

>>> import pytz
>>> i.timezone
'America/Chicago'
>>> pytz.timezone(i.timezone)
<DstTzInfo 'America/Chicago' CST-1 day, 18:00:00 STD>
>>> ot
datetime.datetime(2016, 3, 14, 9, 30, tzinfo=<DstTzInfo
'America/New_York' EDT-1 day, 20:00:00 DST>)
>>> ot.tzinfo
<DstTzInfo 'America/New_York' EDT-1 day, 20:00:00 DST>

Shouldn't the America/Chicago timezone reflect DST?

Thx,

Skip

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Missing something about timezones Skip Montanaro <skip.montanaro@gmail.com> - 2016-03-14 10:19 -0500
  Re: Missing something about timezones Peter Pearson <pkpearson@nowhere.invalid> - 2016-03-16 00:12 +0000
  Re: Missing something about timezones wxjmfauth@gmail.com - 2016-03-16 02:29 -0700

csiph-web