<div dir="ltr"><div><div><div><div>A possibility mentioned last year at the time of the Macquarie fix:<br></div>here&#39;s a more general fix for zic.c. For clarity, it comes in two pieces.<br></div>This first piece simply rolls back the Macquarie-specific changes to zic.c;<br>
</div>it&#39;s both attached and appears in mangled form below. These changes are<br>relative to the git repository version.<br><br></div>    @dashdashado<br><br>1.1<br>2838 lines<br>1.2<br>2805 lines<br>*** /tmp/,azic.c    2014-05-01 01:51:26.531315400 -0400<br>
--- /tmp/,bzic.c    2014-05-01 01:51:26.640515600 -0400<br>***************<br>*** 1480,1490 ****<br>          fromi = 0;<br>          while (fromi &lt; timecnt &amp;&amp; attypes[fromi].at &lt; min_time)<br>              ++fromi;<br>
!         /*<br>!         ** Remember that type 0 is reserved.<br>!         */<br>!         if (isdsts[1] == 0)<br>!             while (fromi &lt; timecnt &amp;&amp; attypes[fromi].type == 1)<br>                  ++fromi;    /* handled by default rule */<br>
          for ( ; fromi &lt; timecnt; ++fromi) {<br>              if (toi != 0 &amp;&amp; ((attypes[fromi].at +<br>--- 1480,1487 ----<br>          fromi = 0;<br>          while (fromi &lt; timecnt &amp;&amp; attypes[fromi].at &lt; min_time)<br>
              ++fromi;<br>!         if (isdsts[0] == 0)<br>!             while (fromi &lt; timecnt &amp;&amp; attypes[fromi].type == 0)<br>                  ++fromi;    /* handled by default rule */<br>          for ( ; fromi &lt; timecnt; ++fromi) {<br>
              if (toi != 0 &amp;&amp; ((attypes[fromi].at +<br>***************<br>*** 1589,1599 ****<br>          }<br>          thistimelim = thistimei + thistimecnt;<br>          thisleaplim = thisleapi + thisleapcnt;<br>
!         /*<br>!         ** Remember that type 0 is reserved.<br>!         */<br>!         writetype[0] = FALSE;<br>!         for (i = 1; i &lt; typecnt; ++i)<br>              writetype[i] = thistimecnt == timecnt;<br>          if (thistimecnt == 0) {<br>
              /*<br>--- 1586,1592 ----<br>          }<br>          thistimelim = thistimei + thistimecnt;<br>          thisleaplim = thisleapi + thisleapcnt;<br>!         for (i = 0; i &lt; typecnt; ++i)<br>              writetype[i] = thistimecnt == timecnt;<br>
          if (thistimecnt == 0) {<br>              /*<br>***************<br>*** 1609,1619 ****<br>              /*<br>              ** For America/Godthab and Antarctica/Palmer<br>              */<br>-             /*<br>-             ** Remember that type 0 is reserved.<br>
-             */<br>              if (thistimei == 0)<br>!                 writetype[1] = TRUE;<br>          }<br>  #ifndef LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH<br>          /*<br>--- 1602,1609 ----<br>              /*<br>
              ** For America/Godthab and Antarctica/Palmer<br>              */<br>              if (thistimei == 0)<br>!                 writetype[0] = TRUE;<br>          }<br>  #ifndef LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH<br>
          /*<br>***************<br>*** 1663,1688 ****<br>          }<br>  #endif /* !defined LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH */<br>          thistypecnt = 0;<br>-         /*<br>-         ** Potentially, set type 0 to that of lowest-valued time.<br>
-         */<br>-         if (thistimei &gt; 0) {<br>-             for (i = 1; i &lt; typecnt; ++i)<br>-                 if (writetype[i] &amp;&amp; !isdsts[i])<br>-                     break;<br>-             if (i != types[thistimei - 1]) {<br>
-                 i = types[thistimei - 1];<br>-                 gmtoffs[0] = gmtoffs[i];<br>-                 isdsts[0] = isdsts[i];<br>-                 ttisstds[0] = ttisstds[i];<br>-                 ttisgmts[0] = ttisgmts[i];<br>
-                 abbrinds[0] = abbrinds[i];<br>-                 writetype[0] = TRUE;<br>-                 writetype[i] = FALSE;<br>-             }<br>-         }<br>          for (i = 0; i &lt; typecnt; ++i)<br>!             typemap[i] = writetype[i] ?  thistypecnt++ : 0;<br>
          for (i = 0; i &lt; sizeof indmap / sizeof indmap[0]; ++i)<br>              indmap[i] = -1;<br>          thischarcnt = 0;<br>--- 1653,1660 ----<br>          }<br>  #endif /* !defined LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH */<br>
          thistypecnt = 0;<br>          for (i = 0; i &lt; typecnt; ++i)<br>!             typemap[i] = writetype[i] ?  thistypecnt++ : -1;<br>          for (i = 0; i &lt; sizeof indmap / sizeof indmap[0]; ++i)<br>              indmap[i] = -1;<br>
          thischarcnt = 0;<br>***************<br>*** 2105,2115 ****<br>          updateminmax(leapminyear);<br>          updateminmax(leapmaxyear + (leapmaxyear &lt; ZIC_MAX));<br>      }<br>-     /*<br>-     ** Reserve type 0.<br>
-     */<br>-     gmtoffs[0] = isdsts[0] = ttisstds[0] = ttisgmts[0] = abbrinds[0] = -1;<br>-     typecnt = 1;<br>      for (i = 0; i &lt; zonecount; ++i) {<br>          zp = &amp;zpfirst[i];<br>          if (i &lt; zonecount - 1)<br>
--- 2077,2082 ----<br><br></div>