<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 8, 2015 at 9:49 PM, Chris Angelico <span dir="ltr"><<a href="mailto:rosuav@gmail.com" target="_blank">rosuav@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Sep 9, 2015 at 5:45 AM, Alexander Belopolsky<br>
<<a href="mailto:alexander.belopolsky@gmail.com">alexander.belopolsky@gmail.com</a>> wrote:<br>
> Definitions: An aware datetime value t is called "regular" if t.utcoffset()<br>
> does not depend on the value of the fold attribute.<br>
<br>
</span>One point to clarify here. Is the definition of "regular" based on the<br>
timezone alone (that is to say, a UTC datetime is regular, and an<br>
Australia/Brisbane datetime is regular, but anything in a region with<br>
DST is always special), or are "special" datetimes only those in the<br>
fold period?</blockquote></div><br>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.</div></div>