On Tue, Sep 8, 2015 at 9:49 PM, Chris Angelico <[email protected]> wrote:

> On Wed, Sep 9, 2015 at 5:45 AM, Alexander Belopolsky
> <[email protected]> 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?


It is what the definition says.  If you want to know whether t is regular
you have to compare t.utcoffset() and
t.replace(fold=1-t.fold).utcoffset().  If they are the same, t is regular.
If not - t is special.  If tzinfo is a fixed offset timezone, all times
with such tzinfo are regular.  If tzinfo is a typical DST observing
timezone, then times in the fold and in the gap are special and the rest
are regular.
_______________________________________________
Datetime-SIG mailing list
[email protected]
https://mail.python.org/mailman/listinfo/datetime-sig
The PSF Code of Conduct applies to this mailing list: 
https://www.python.org/psf/codeofconduct/

Reply via email to