<div dir="ltr">Sorry to be pedantic again, but I&#39;m trying to get my head round some fiddly code, and I&#39;ve come across an interesting bit of ambiguity.<div><br></div><div>FROM and TO are <a href="http://www.ietf.org/timezones/code/zic.8.txt">described</a> like this:</div>

<div><br></div><div><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex" class="gmail_quote">       FROM    Gives the first year in which the rule applies.  Any integer<br>

               year can be supplied; the Gregorian calendar is assumed.  The<br>               word minimum (or an abbreviation) means the minimum year<br>               representable as an integer.  The word maximum (or an<br>

               abbreviation) means the maximum year representable as an<br>               integer.  Rules can describe times that are not representable<br>               as time values, with the unrepresentable times ignored; this<br>

               allows rules to be portable among hosts with differing time<br>               value types. </blockquote><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex" class="gmail_quote">

 </blockquote><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex" class="gmail_quote">TO      Gives the final year in which the rule applies.  In addition to<br>

               minimum and maximum (as above), the word only (or an<br>               abbreviation) may be used to repeat the value of the FROM<br>               field.</blockquote><div><br></div><div>It&#39;s not clear whether that &quot;year&quot; is:</div>

<div><ol><li>The year in UTC at the transition</li><li>The year in the local time before the transition<br></li><li>The year in the local time after the transition</li><li>The year in the same frame of reference as the &quot;AT&quot; part</li>

</ol><div>Option 1 seems unlikely.</div><div><br></div><div>Options 2 and 3 seem likely to be equivalent in all realistic time zones - it would be odd for a time zone to add an hour of DST at 11.30pm on December 31st, for example... and even odder for it to <i>subtract</i> an hour of DST at 00.30am on January 1st.</div>

</div></div><div><br></div><div>Option 4 is tricky. In some ways it feels natural - if you&#39;re going to use one frame of reference for a time, why not do it for the date as well? On the other hand, it means that a &quot;TO&quot; value of (say) 2001 where the transition is at 2am UTC on January 1st in a time zone with a standard time of UTC+8 would actually have its last transition in 2000 local time, assuming I&#39;ve got my maths right.</div>

<div><br>Can I assume that one of option 2 or option 3 is intended, and that no sensible time zone will ever make those two options behave differently?</div><div><br></div><div>I&#39;ve tried reading the C source code, but given the subtleties involved, I&#39;d rather trust a natural language description. If we can come to a conclusion about this, I&#39;d like to propose that we amend the text to be unambiguous, too.</div>

<div><br></div><div>Jon</div><div><br></div></div>