[Datetime-SIG] IANA TZ database statistics

Tim Peters tim.peters at gmail.com
Fri Sep 25 23:32:50 CEST 2015

> Based on the fold size statistic, I have implemented [1] a more robust
> fold-detection algorithm that passes the exhaustive test.  The only
> assumption that it requires is that no fold is bigger than 24 hours.
> [1]:
> https://github.com/abalkin/cpython/commit/54d3596b0180512c68c91e8308665c0a9e61c9eb

Wondering whether this line:

    if probe2 != result + trans:

could be replaced with:

    if probe2 == result:

I'm not sure what the first line is saying ;-)  The second line says
to me "this is the later time in a fold if and only if subtracting the
width of the fold from the starting timestamp converts to the same
local time - that's what 'the later time in a fold' means".

More information about the Datetime-SIG mailing list