[Datetime-SIG] PEP 495: What's left to resolve

Chris Angelico rosuav at gmail.com
Wed Sep 9 03:49:15 CEST 2015

On Wed, Sep 9, 2015 at 5:45 AM, Alexander Belopolsky
<alexander.belopolsky at gmail.com> wrote:
> Definitions:  An aware datetime value t is called "regular" if t.utcoffset()
> does not depend on the value of the fold attribute.

One point to clarify here. Is the definition of "regular" based on the
timezone alone (that is to say, a UTC datetime is regular, and an
Australia/Brisbane datetime is regular, but anything in a region with
DST is always special), or are "special" datetimes only those in the
fold period?

The former is easily identified. As the zoneinfo file is parsed, it'll
be obvious which ones can ever have times that differ only in fold,
and they get flagged as "special". The check is simple - ask the
timezone object whether it's regular or special.

The latter, perhaps not so much. Given a particular datetime, can you
easily and reliably ascertain whether or not there is any other
section of time which can "look like" this one?

Maybe I've missed something, having been skimming rather than reading
every post in detail. (There have been rather a lot of them, and here
I am making that worse...)


More information about the Datetime-SIG mailing list