[Datetime-SIG] DST explained visually

Alexander Belopolsky alexander.belopolsky at gmail.com
Wed Aug 26 21:37:04 CEST 2015

On Wed, Aug 26, 2015 at 3:00 PM, Guido van Rossum <guido at python.org> wrote:

> The proposal in PEP 495 adds a 'fold' flag whose value is 0 *except* for
> local times mapped from UTC period C-D; between C and D local time is
> between R and S with fold=1. (Note that the current text of the PEP has a
> flag named 'first' whose definition is the opposite; but the plan is to
> switch to fold=0. In any case it's one bit of information and it's only
> used for times between P-Q.)

I have edited [1] your sketch to show the UTC mappings of two local times:
g in the gap and f in the fold: (g, fold=0) maps to G0, (g, fold=1) maps to
G1, (f, fold=0) maps to F0, and (f, fold=1) maps to F1. Note that G1 < G0
while F1 > F0.  This may look arbitrary, but it follows from a consistent
rule: fold=0 is the intersection with the line that is solid (valid) before
the transition and fold=1 is the intersection with the line that is solid
(valid) after the transition.

[1]: https://github.com/abalkin/ltdf/blob/master/dst-visual.jpg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150826/63f2ca0c/attachment-0001.html>

More information about the Datetime-SIG mailing list