Missing something about timezones
Ian Kelly
ian.g.kelly at gmail.com
Mon Mar 14 11:26:34 EDT 2016
More information about the Python-list mailing list
Mon Mar 14 11:26:34 EDT 2016
- Previous message (by thread): Missing something about timezones
- Next message (by thread): Missing something about timezones
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Mar 14, 2016 at 9:19 AM, Skip Montanaro <skip.montanaro at 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.
- Previous message (by thread): Missing something about timezones
- Next message (by thread): Missing something about timezones
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list