<div dir="ltr"><div>Happy leap second.</div><div><br></div><div>In 2016i Pacific/Tongatapu changed to:</div><div><br></div><div> (1) use numeric time zone abbreviations, and</div><div> (2) observe DST from the first Sunday in November through the third Sunday in January.</div><div><br></div><div>That is, its POSIX future rule became "<+13>-13<+14>,M11.1.0,M1.3.0/3".</div><div><br></div><div>(1) results, under WORK_AROUND_QTBUG_53071, in zic adding a "y2038_boundary - 1" (i.e., 2038-01-19 03:14:07 +00:00) no-op transition to the end of the generated transitions.  So, the Pacific/Tongatapu zoneinfo file looks like ...</div><div><br></div><div>      :</div><div>  2115810000 gmtoff=46800 is_dst=F abbr="+13"</div><div>  2140606800 gmtoff=50400 is_dst=T abbr="+14"</div><div>  2147483647 gmtoff=50400 is_dst=T abbr="+14"</div><div><br></div><div>When loading Pacific/Tongatapu at runtime, (2) results in tzloadbody() generating additional transitions ...</div><div><br></div><div>      :</div><div>  2140606800 gmtoff=50400 is_dst=T abbr="+14"</div><div>  2147259600 gmtoff=46800 is_dst=F abbr="+13"</div><div>  2172661200 gmtoff=50400 is_dst=T abbr="+14"</div><div>  2178709200 gmtoff=46800 is_dst=F abbr="+13"</div><div>      :</div><div><br></div><div>When those generated transitions are patched onto the end of the zic transitions, we end up with ...</div><div><br></div><div>  2115810000 gmtoff=46800 is_dst=F abbr="+13"</div><div>  2140606800 gmtoff=50400 is_dst=T abbr="+14"</div><div>  2147483647 gmtoff=50400 is_dst=T abbr="+14"</div><div>  2172661200 gmtoff=50400 is_dst=T abbr="+14"</div><div>  2178709200 gmtoff=46800 is_dst=F abbr="+13"</div><div>  </div><div>This is wrong.  The presence of the 2147483647 transition caused us to drop the 2147259600 transition.  That is, we lost the shift out of DST at 2038-01-17 02:00:00 +13:00 (2038-01-16 13:00:00 +00:00).</div><div><br></div><div>One solution would be to trim trailing, no-op transitions from the end of the zic transitions before adding the rule-generated ones.  The reference implementation doesn't need them.</div><div><br></div><div>Bradley</div></div>