<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">(+<a href="mailto:howard.hinnant@gmail.com">howard.hinnant@gmail.com</a>, for reference to his <a href="https://github.com/HowardHinnant/date">https://github.com/HowardHinnant/date</a> library below)</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hello folks,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I maintain  my own TZ database parser and compiler for one of my projects. I run automatic validation tests against Howard's date library, so I was curious about how my TZ parser and Howard's parser handle this 2:00 versus the 3:00 UNTIL time for America/Grand_Turk. The summary is that both of them handle the 2:00 UNTIL time just fine.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I did not write any special case for Grand_Turk in my parser, so I was curious to know why it just worked, just in case it worked only "accidentally". It took me some time to understand my own code, since I cannot keep all of its parsing logic in my head for more than a few weeks at a time. The core of why it "just works" seems be in the interpretation of the "2:00 transition to US Rule", and the fact that "2:00" is Wall-time, not S-time or U-time: <br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">So, on Mar 11, 2018:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">* At 1:59, Grand_Turk is on UTC-4. It does not know about Eastern Time, nor does it care.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">* At 2:00, Grand_Turk switches to UTC-5, and starts using US Rules. One of those US rules says, at 2:00 *wall time*, use SAVE +1.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">* Grand_Turk says, ok, I used to be on UTC-4. Now the rules say that I should be UTC-5+1 (i.e. UTC-4), so I'll just keep using UTC-4. The wall clock goes from 1:59, to 2:00, then 2:01, ..., 2:59, then finally to 3:00.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">* Grand_Turk only cares about transition rules and UTC offsets. It does not know about Eastern Time, so it does not change 2:00 to 1:00.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">* The time interval 2:00-3:00 does not exist for clocks on Eastern Time. But Grand_Turk is not using an Eastern clock, it's using its own clock, and 2:00-3:00 *does* exist for Grand_Turk.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Anyway, that's my simple human translation of what my code does for this case. The actual logic, just like zic.c, is far more complicated than can be explained in words. I am not familiar with the details of what Howard's date library does internally, but I'm always happy to be in agreement with his  library.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Regards,<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Brian<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 7, 2020 at 5:25 PM Arthur David Olson <<a href="mailto:arthurdavidolson@gmail.com">arthurdavidolson@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>
> Good memory! <br></div><div><br></div><div>I wish. In this case, though, grep and a comprehensive text file of time zone electronic mail sufficed.-)</div><div><br></div><div>    --ado<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 7, 2020 at 8:13 PM Paul Eggert <<a href="mailto:eggert@cs.ucla.edu" target="_blank">eggert@cs.ucla.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 12/7/20 1:29 PM, Arthur David Olson wrote:<br>
> <a href="https://mm.icann.org/pipermail/tz/1996-May/date.html" rel="noreferrer" target="_blank">https://mm.icann.org/pipermail/tz/1996-May/date.html</a> <br>
> <<a href="https://mm.icann.org/pipermail/tz/1996-May/date.html" rel="noreferrer" target="_blank">https://mm.icann.org/pipermail/tz/1996-May/date.html</a>><br>
> ...includes links to messages regarding the work done in 1996; check out the <br>
> messages including "simultaneous" in the subject.<br>
<br>
Thanks for the pointers. So it's a bit of code that you and I wrote, and that <br>
I'd totally forgotten about. Good memory!<br>
<br>
For the record, the commit in question is dated 1996-05-16 13:48:28 -04 and can <br>
be found here:<br>
<br>
<a href="https://github.com/eggert/tz/commit/2f53da99b5fb6e0a4cf5861ed80d84643032aeec" rel="noreferrer" target="_blank">https://github.com/eggert/tz/commit/2f53da99b5fb6e0a4cf5861ed80d84643032aeec</a><br>
<br>
and it says (in C) roughly what I attempted to write (in longer English) in the <br>
recent doc patch. Admittedly a bit of a delay between installing the code and <br>
installing the corresponding documentation....<br>
</blockquote></div>
</blockquote></div>