<div dir="ltr">Just as an aid to verifying this, could you tell us which copy of the data you&#39;re using (as each file contains two or three copies of the information).<div><br></div><div>A hex dump of the relevant section would be really handy, too.</div><div><br></div><div>Jon</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 13 August 2015 at 17:21, Eric Erhardt <span dir="ltr">&lt;<a href="mailto:Eric.Erhardt@microsoft.com" target="_blank">Eric.Erhardt@microsoft.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal">I am working on enabling the .NET TimeZoneInfo class to read time zone information from tzfiles.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I’ve hit a snag with the latest tzdata 2015f.  (I’m not sure when this change started, but the problem doesn’t occur with the tzfiles that are shipped with an Ubuntu 14.04 distribution.)<u></u><u></u></p>
<p class="MsoNormal">The problem is that the 2015f version of the tzdata contains an initial &quot;Transition Time&quot; that is out of order. The beginning of the America/Chicago tzfile looks like the following:<u></u><u></u></p>
<table border="1" cellspacing="0" cellpadding="0" style="border-collapse:collapse;border:none">
<thead>
<tr>
<td width="149" style="width:111.75pt;border:solid windowtext 1.5pt;padding:0in 0in 0in 0in">
<p class="MsoNormal" align="center" style="text-align:center"><b><span style="font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;color:#333333">Transition Time<u></u><u></u></span></b></p>
</td>
<td width="120" style="width:1.25in;border:solid windowtext 1.5pt;border-left:none;padding:0in 0in 0in 0in">
<p class="MsoNormal" align="center" style="text-align:center"><b><span style="font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;color:#333333">Transition Offset<u></u><u></u></span></b></p>
</td>
</tr>
</thead>
<tbody>
<tr>
<td width="149" style="width:111.75pt;border:solid windowtext 1.5pt;border-top:none;padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;color:#333333;background:yellow">01/01/1970 00:00:00<u></u><u></u></span></p>
</td>
<td width="120" style="width:1.25in;border-top:none;border-left:none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext 1.5pt;padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;color:#333333;background:yellow">-05:50:36<u></u><u></u></span></p>
</td>
</tr>
<tr>
<td width="149" style="width:111.75pt;border:solid windowtext 1.5pt;border-top:none;padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;color:#333333">11/18/1883 18:00:00<u></u><u></u></span></p>
</td>
<td width="120" style="width:1.25in;border-top:none;border-left:none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext 1.5pt;padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;color:#333333">-06:00:00<u></u><u></u></span></p>
</td>
</tr>
<tr>
<td width="149" style="width:111.75pt;border:solid windowtext 1.5pt;border-top:none;padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;color:#333333">03/31/1918 08:00:00<u></u><u></u></span></p>
</td>
<td width="120" style="width:1.25in;border-top:none;border-left:none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext 1.5pt;padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;color:#333333">-05:00:00 DST<u></u><u></u></span></p>
</td>
</tr>
<tr>
<td width="149" style="width:111.75pt;border:solid windowtext 1.5pt;border-top:none;padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;color:#333333">10/27/1918 07:00:00<u></u><u></u></span></p>
</td>
<td width="120" style="width:1.25in;border-top:none;border-left:none;border-bottom:solid windowtext 1.5pt;border-right:solid windowtext 1.5pt;padding:0in 0in 0in 0in">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Helvetica&quot;,sans-serif;color:#333333">-06:00:00<u></u><u></u></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal">Notice the first entry is for 1970, and then the next entry is for 1883. This breaks the documentation in &#39;man tzfile&#39;:<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:.2in">
The above header is followed by tzh_timecnt four-byte values of type long, <b>sorted in ascending order</b>. These values are written in &quot;standard&quot; byte order. Each is used as a transition time (as returned by time(2)) at which the rules for computing local
 time change.<u></u><u></u></p>
<p class="MsoNormal">This causes the TimeZoneInfo parsing code to throw an exception because it is assuming these transitions are sorted in ascending order.<u></u><u></u></p>
<p class="MsoNormal">Is this an intentional change in the tzfiles?  If so, will the tzfile man page be updated for this change?<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></p><span class="HOEnZb"><font color="#888888">
<p class="MsoNormal">Eric Erhardt<u></u><u></u></p>
</font></span></div>
</div>

</blockquote></div><br></div>