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


Groups > comp.lang.python > #104826 > unrolled thread

Re: Missing something about timezones

Started byIan Kelly <ian.g.kelly@gmail.com>
First post2016-03-14 09:26 -0600
Last post2016-03-14 09:26 -0600
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Missing something about timezones Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-14 09:26 -0600

#104826 — Re: Missing something about timezones

FromIan Kelly <ian.g.kelly@gmail.com>
Date2016-03-14 09:26 -0600
SubjectRe: Missing something about timezones
Message-ID<mailman.107.1457969237.12893.python-list@python.org>
On Mon, Mar 14, 2016 at 9:19 AM, Skip Montanaro
<skip.montanaro@gmail.com> wrote:
> 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?

Why should it? You only asked pytz for the Chicago timezone. You
didn't ask for it relative to any specific time.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web