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


Groups > comp.lang.python > #104826

Re: Missing something about timezones

Path csiph.com!feeder.erje.net!2.eu.feeder.erje.net!newsfeed0.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail
From Ian Kelly <ian.g.kelly@gmail.com>
Newsgroups comp.lang.python
Subject Re: Missing something about timezones
Date Mon, 14 Mar 2016 09:26:34 -0600
Lines 19
Message-ID <mailman.107.1457969237.12893.python-list@python.org> (permalink)
References <CANc-5UxYPyj85EZfOwGuJarBNj=Ob4mdu7A3Vt4rL8qJhTi+8A@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de 7epUnxKrN6Dop4Y2RXXVIQLYwm+JVyiWs3iS/7oVkOLA==
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.059
X-Spam-Evidence '*H*': 0.88; '*S*': 0.00; 'received:209.85.223': 0.03; '2016': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; "shouldn't": 0.18; 'skip': 0.18; 'chicago': 0.22; 'am,': 0.23; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'message-id:@mail.gmail.com': 0.27; '14,': 0.27; 'reflect': 0.27; 'correct': 0.28; "skip:' 10": 0.28; 'asked': 0.29; 'relative': 0.30; 'skip:d 20': 0.34; 'received:google.com': 0.35; 'should': 0.36; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'skip:p 20': 0.38; 'why': 0.39; "didn't": 0.39; 'to:addr:python.org': 0.40; '30,': 0.63; 'mar': 0.65; 'day,': 0.65; 'savings': 0.79; '9:19': 0.84; 'to:name:python': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=9be5GgdKroHYgXkth9CWSkYEZBMIF5bgTAvW+z0swsM=; b=BHrcDXsNE5fZ1HcMvikNvIeAIGijLImQNej6+JqxTZIVqugQNxj7bmexijnuRI/epu qDIff2G7Yjgd1zNyX7nztxp+hwlk+gTB6JisDaJcR1vpuwHC/9K7Ol+IyB0hHXUzMxUm cjBixo28Fe6G2iDmH9j9XOJZfwcf/A5v9W2RLu0+wJyiXLQ7hWR4gOWJQU8oumCvhwCM 2pNi1rDvDLacC4ng1rK/Uyf3YmGS6X4Qcvr0Ehf6dj60y6SN6hxmLzYcfSWx/KZRGng/ teT77Y6GlPLzHN0YgpVQE5cEKOHh1FIXAk+rcgzZpAD54LZQMNNsti+ZdsXPdZv0Voi9 NRmA==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=9be5GgdKroHYgXkth9CWSkYEZBMIF5bgTAvW+z0swsM=; b=g4wRVzAgsbYZrfwnc2lJhG3bLvBFkoMDTa2XRRCuJjzmwl9zqn1G3b/wFgMiu1LRs+ LG5q6cnFw1s8QM3M79jYyEE4eIujwtaOYBn6FdBdWWBB+uz6U8yzLC2w16zzwpg8QMQg fJdXnw9c3a52c/s3sgnutHfsA0x8N4sAuQwGyEBwylwTjFGym6skDPf07oowQsqoMeS+ k+jspxsqmIa7xBk7VxX0ndHcyLI0odP7YtQGJTd7b7B/nv4sib+7DaCmJQ9kC0pV1F3v cul+af5DYA9LEO6F3+IKf0HxhxJLi35U9YSbEu0y8NtA9sw597er41MpJBZn86YLKvOL lknQ==
X-Gm-Message-State AD7BkJJjMPuUrrxFq8bAjLK4mkDv2dalgv7HdaZFSGgKAP3Y6fQH4FFhq4e7QcB0zoTgLeDkMkBHPDI/yvzilw==
X-Received by 10.107.19.140 with SMTP id 12mr27660448iot.11.1457969234763; Mon, 14 Mar 2016 08:27:14 -0700 (PDT)
In-Reply-To <CANc-5UxYPyj85EZfOwGuJarBNj=Ob4mdu7A3Vt4rL8qJhTi+8A@mail.gmail.com>
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:104826

Show key headers only | View raw


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.

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


Thread

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

csiph-web