[Datetime-SIG] PEP 495 (Local Time Disambiguation) is ready for pronouncement

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Aug 18 20:03:57 CEST 2015

On Tue, Aug 18, 2015 at 1:36 PM, Guido van Rossum <guido at python.org> wrote:

> How about this diagram?
>     fold=True | fold=False
>           +---+----------->
>            \  .
>             \ .
> fold=False   \.
> ------------->+
> That's how I think of what happens when you set the clock an hour back.

This is a traditional way to visualize the end of DST (with the summer time
at the bottom and the winter time at the top), but in the context of PEP
495, a slightly different picture is more appropriate.  After addition of
the disambiguation flag, the set of local times doubles, so instead of one
time line, you have two:

fold=True  o o o o +---+ o o o o o ... o o o o o o o o o o o
                    .  .                       "Gap"
                     . . <- "Fold"               |
                      ..                         V
fold=False ----------->+---------- ... ------> o o o +------

Valid times are represented as dashes ("-") on the diagram above and
invalid as circles ("o").  Note that in this picture, the current
"fold-unaware" timeline is just the bottom line (fold=False), while your
picture suggests that fold=False set is somehow discontinuous at the
fall-back point, but it is not in the fold-unaware world, and preserving
this was one of my design goals for PEP 495.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150818/e5ff16be/attachment.html>

More information about the Datetime-SIG mailing list