<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Is there a known special problem for Europe/Kaliningrad? My code and the HowardHinnant date library agree on this transition. The TZ database says:<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">Zone Europe/Kaliningrad<br></div> 3:00   Russia  MSK/MSD 1989 Mar 26  2:00s              <br><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"> 2:00   Russia  EE%sT   2011 Mar 27  2:00s</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">Rule    Russia  1984    1995    -       Sep     lastSun  2:00s  0       -       <br>Rule    Russia  1985    2010    -       Mar     lastSun  2:00s  1:00    S</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">So, on Mar 26, 1989:</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">* at 1:59, Kaliningrad is on UTC+3 (SAVE=0)</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">* at 2:00s (which is identical to 'w' in this case, because we need to use the STDOFF of the transition immediately to the left), Kaliningrad switches to UTC+2+{SAVE}</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">* but the Russia rule also takes effect at 2:00s, so SAVE becomes +1</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">* so Kaliningrad switches to UTC+2+1, i.e. remains at UTC+3</div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">* Kaliningrad clock stays at 2:00 </div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">I think the key here is that both the Zone entry and the Rule entry use the same "2:00s", which are both interpreted using the STDOFF of the transition immediately to the left of the 2:00s.<br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">I don't know the internal details of the HowardHinnant's date library, but my code normalizes the various transition times to 'w' time, so the above explanation is only a rough translation of what the code actually does. The other interesting question is what happens on Sept 24, 1989, when it reverts back to STD time at 2:00s. Both my code and HowardHinnant date library seem to correctly convert the 2:00s to 3:00w, and the clock goes from 2:59 -> 2:00.<br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">Brian<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 29, 2020 at 11:58 AM Michael H Deckers <<a href="mailto:michael.h.deckers@googlemail.com" target="_blank">michael.h.deckers@googlemail.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"><br>
    On 2020-12-29 19:55, Michael H Deckers wrote:<br>
<br>
> 1991 Mar 31  2:00s<br>
><br>
    instead of 1989 Mar 26  2:00s<br>
<br>
<br>
    Sorry.<br>
<br>
    Michael Deckers.<br>
<br>
<br>
</blockquote></div>
</div>