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


Groups > comp.lang.python > #104821

Missing something about timezones

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Skip Montanaro <skip.montanaro@gmail.com>
Newsgroups comp.lang.python
Subject Missing something about timezones
Date Mon, 14 Mar 2016 10:19:23 -0500
Lines 18
Message-ID <mailman.103.1457968773.12893.python-list@python.org> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de RtpRa5xn7PuHotsHR+WEfwl1rNqG6suVp0z00pK2UPCg==
Return-Path <skip.montanaro@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.108
X-Spam-Level *
X-Spam-Evidence '*H*': 0.79; '*S*': 0.00; 'received:io': 0.16; 'received:psf.io': 0.16; "shouldn't": 0.18; 'skip': 0.18; '>>>': 0.20; 'import': 0.24; 'message-id:@mail.gmail.com': 0.27; '14,': 0.27; 'reflect': 0.27; 'correct': 0.28; "skip:' 10": 0.28; 'skip:d 20': 0.34; 'received:google.com': 0.35; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'received:209': 0.38; 'skip:p 20': 0.38; 'received:209.85.220': 0.38; 'to:addr:python.org': 0.40; '30,': 0.63; 'savings': 0.79; 'to:name:python': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=xpVqQbEYfmjC49ggMWSJRW/VNXvGwIRUPsG+V3UeW1o=; b=PHEEtEA8TzIEwgSbQloJYHd+0VIP3nk4ChXkvE9sdY2zeVYuL3S/fRFyvR3IccXh62 2rGy3NAUB57VKROflEqrXkOzUC5rfK8X1tuK4KlH6Cr/CuY5o1jEFDLL7TwBABJH6v8Z Tk1XZAiGXpWcAPISo9m4YxZUR1KObeLn5TuN8MvNpbguDsGH4wKwoKctKvmNwbIN7idn MI/VuS+hYwUvXSuYlhutfkLaL/SSXKcqSwHC9pCHiwOT7pc9kecw8x4a31OQKgjjFceO /ojtuwvwMT9FYI6R2TG/LD8joc75Z8y1u+M12LxEBuIgyFc0KD40l8h3LJetPlLIeDIh TeYA==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=xpVqQbEYfmjC49ggMWSJRW/VNXvGwIRUPsG+V3UeW1o=; b=chaa91+9mD/ELWmCd4gINLgHNOJO96ahdNdIQNC1Mg+Q1R7YzOVf2NicywQwZI95ba +npjQ4cod9+ESKqFOf0pvERCeQmbT6LSPhKCWx4G5djGDqqsSEUE+hYZf0ozd5y6Om5o qcdKBSCqfGccLRbIwgRtj/qkknZfq9PTzMYb6PaKGZcoWho5aG6iUIMKQPJvwQ6n/DpD 33bBtC2LbkCOd7xoj0I+rTA+U3Zr3THvOX8uxPNaIkejNARYWK47Mbkj+KapPQ925BI/ erzKGMd3tcyiRwdceV+aqmmGHSRDmHyI3u4vqhWaMtYT655Efw1sTnr761UhWQ+4Ulgq XjGQ==
X-Gm-Message-State AD7BkJJ37FvbCdbtJ2xLgUimLySY4tvXRphDLvx8hsmlTieVCVwVsYHYaLOH3/rmgXNE6hGSvt+mygHiWf69sg==
X-Received by 10.55.79.5 with SMTP id d5mr20509996qkb.30.1457968763959; Mon, 14 Mar 2016 08:19:23 -0700 (PDT)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:104821

Show key headers only | 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