<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 8, 2015 at 11:46 AM, Alexander Belopolsky <span dir="ltr"><<a href="mailto:alexander.belopolsky@gmail.com" target="_blank">alexander.belopolsky@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">it breaks the rule that for fold=0 nothing changes.</blockquote></div><br>We may need a new section in the PEP explaining the differences between pre-PEP and post-PEP tzinfo implementations.  For example, it is not true that post-PEP utcoffset() will return the same value on a fold=0 instance as a pre-PEP does.   The pre-PEP rule is to treat both ambiguous (fold) and missing (gap) times as "standard time".  In the typical DST observing timezone that alternated between STD and DST, this means that pre-PEP rule treats fold times as fold=1 and gap times as fold=0.  For more complicated situations where you can see two folds or two gaps in a row or a time shift without a DST change (a change in STD offset), no rule is currently specified.</div><div class="gmail_extra"><br></div><div class="gmail_extra">The existing rules for fold/gap disambiguation are formulated for a single purpose: to make the generic fromutc() implementation work for the US-style timezones.  Since PEP 495 requires that the new tzinfo implementations reimplement their own fromutc(), we decided that we are free to formulate new gap/fold disambiguation rules.</div><div class="gmail_extra"><br></div><div class="gmail_extra">The PEP 495 rules are formulated to be more rational than those that were dictated by the fromutc() implementation.  For example, defaulting to the first time in the fold seems more natural and a wise choice: it the worst case you will have to kill an hour before the odd time meeting, but you won't miss it. </div></div>