Home | History | Annotate | Line # | Download | only in time
tz-how-to.html revision 1.6
      1 <!DOCTYPE html
      2 	PUBLIC "-//W3C//DTD HTML 4.01//EN"
      3 	"http://www.w3.org/TR/html4/strict.dtd">
      4 <html>
      5 <head>
      6 <title>How to Read the tz Database</title>
      7 <meta http-equiv="Content-type" content='text/html; charset="UTF-8"'>
      8 <style type="text/css">
      9 pre {margin-left: 2em; white-space: pre-wrap;}
     10 </style>
     11 </head>
     12 <body>
     13 <h2>How to Read the <a href="https://en.wikipedia.org/wiki/Tz_database">tz
     14 Database</a> Source Files</h2>
     15 <h3>by Bill Seymour</h3>
     16 <p>This page uses the <code>America/Chicago</code> and
     17 <code>Pacific/Honolulu</code> zones as examples of how to infer
     18 times of day from the <a href="tz-link.html">tz database</a>
     19 source files. It might be helpful, but not absolutely necessary,
     20 for the reader to have already downloaded the
     21 latest release of the database and become familiar with the basic layout
     22 of the data files. The format is explained in the &ldquo;man
     23 page&rdquo; for the zic compiler, <code>zic.8.txt</code>, in
     24 the <code>code</code> subdirectory.</p>
     25 
     26 <p>We&rsquo;ll begin by talking about the rules for changing between standard
     27 and daylight saving time since we&rsquo;ll need that information when we talk
     28 about the zones.</p>
     29 
     30 <p>First, let&rsquo;s consider the special daylight saving time rules
     31 for Chicago (from the <code>northamerica</code> file in
     32 the <code>data</code> subdirectory):</p>
     33 
     34 <table border="1">
     35 <tr>
     36   <th colspan="6">From the Source File</th>
     37 </tr>
     38 <tr>
     39   <td colspan="6" align="center"><table><tr><td>
     40 <pre>
     41 #Rule NAME    FROM TO   TYPE IN  ON      AT   SAVE LETTER
     42 Rule  Chicago 1920 only  -   Jun 13      2:00 1:00 D
     43 Rule  Chicago 1920 1921  -   Oct lastSun 2:00 0    S
     44 Rule  Chicago 1921 only  -   Mar lastSun 2:00 1:00 D
     45 Rule  Chicago 1922 1966  -   Apr lastSun 2:00 1:00 D
     46 Rule  Chicago 1922 1954  -   Sep lastSun 2:00 0    S
     47 Rule  Chicago 1955 1966  -   Oct lastSun 2:00 0    S
     48 </pre>
     49   </td></tr></table></td>
     50 </tr>
     51 <tr>
     52   <th colspan="6">Reformatted a Bit</th>
     53 </tr>
     54 <tr>
     55   <th>From</th>
     56   <th>To</th>
     57   <th colspan="2">On</th>
     58   <th>At</th>
     59   <th>Action</th>
     60 </tr>
     61 <tr align="center">
     62   <td colspan="2">1920 only</td>
     63   <td colspan="2">June 13<small><sup>th</sup></small></td>
     64   <td rowspan="6">02:00 local</td>
     65   <td>go to daylight saving time</td>
     66 </tr>
     67 <tr align="center">
     68   <td>1920</td>
     69   <td>1921</td>
     70   <td rowspan="5">last Sunday</td>
     71   <td>in October</td>
     72   <td>return to standard time</td>
     73 </tr>
     74 <tr align="center">
     75   <td colspan="2">1921 only</td>
     76   <td>in March</td>
     77   <td rowspan="2">go to daylight saving time</td>
     78 </tr>
     79 <tr align="center">
     80   <td rowspan="2">1922</td>
     81   <td>1966</td>
     82   <td>in April</td>
     83 </tr>
     84 <tr align="center">
     85   <td>1954</td>
     86   <td>in September</td>
     87   <td rowspan="2">return to standard time</td>
     88 </tr>
     89 <tr align="center">
     90   <td>1955</td>
     91   <td>1966</td>
     92   <td>in October</td>
     93 </tr>
     94 </table>
     95 
     96 <p>We&rsquo;ll basically just ignore the <code>TYPE</code> column.
     97 In the 2007j release, the most recent as of this writing, the
     98 <code>TYPE</code> column never contains anything but a hyphen,
     99 a kind of null value. (From the description in <code>zic.8.txt</code>,
    100 this appears to be a mechanism for removing years from a set
    101 in some localizable way. It&rsquo;s used in the file, <code>pacificnew</code>,
    102 to determine whether a given year will have a US presidential election;
    103 but everything related to that use is commented out.)
    104 
    105 <p>The <code>SAVE</code> column contains the wall clock offset from
    106 local standard time.
    107 This is usually either zero for standard time or one hour for daylight
    108 saving time; but there&rsquo;s no reason, in principle, why it can&rsquo;t
    109 take on other values.
    110 
    111 <p>The <code>LETTER</code> (sometimes called <code>LETTER/S</code>)
    112 column can contain a variable
    113 part of the usual abbreviation of the time zone&rsquo;s name, or it can just
    114 be a hyphen if there&rsquo;s no variable part. For example, the abbreviation
    115 used in the central time zone will be either &ldquo;CST&rdquo; or
    116 &ldquo;CDT&rdquo;. The variable part is &lsquo;S&rsquo; or &lsquo;D&rsquo;;
    117 and, sure enough, that&rsquo;s just what we find in
    118 the <code>LETTER</code> column
    119 in the <code>Chicago</code> rules. More about this when we talk about
    120 &ldquo;Zone&rdquo; lines.
    121 
    122 <p>One important thing to notice is that &ldquo;Rule&rdquo; lines
    123 want at once to be both <i>transitions</i> and <i>steady states</i>:
    124 <ul>
    125 <li>On the one hand, they represent transitions between standard and
    126 daylight saving time; and any number of Rule lines can be in effect
    127 during a given period (which will always be a non-empty set of
    128 contiguous calendar years).</li>
    129 <li>On the other hand, the <code>SAVE</code> and <code>LETTER</code>
    130 columns contain state that exists between transitions. More about this
    131 when we talk about the US rules.</li>
    132 </ul>
    133 
    134 <p>In the example above, the transition to daylight saving time
    135 happened on the 13<small><sup>th</sup></small> of June in 1920, and on
    136 the last Sunday in March in 1921; but the return to standard time
    137 happened on the last Sunday in October in both of those
    138 years. Similarly, the rule for changing to daylight saving time was
    139 the same from 1922 to 1966; but the rule for returning to standard
    140 time changed in 1955. Got it?</p>
    141 
    142 <p>OK, now for the somewhat more interesting &ldquo;US&rdquo; rules:</p>
    143 
    144 <table border="1">
    145 <tr>
    146   <th colspan="6">From the Source File</th>
    147 </tr>
    148 <tr>
    149   <td colspan="6" align="center"><table><tr><td>
    150 <pre>
    151 #Rule NAME FROM TO   TYPE IN  ON        AT   SAVE LETTER/S
    152 Rule  US   1918 1919  -   Mar lastSun  2:00  1:00 D
    153 Rule  US   1918 1919  -   Oct lastSun  2:00  0    S
    154 Rule  US   1942 only  -   Feb 9        2:00  1:00 W # War
    155 Rule  US   1945 only  -   Aug 14      23:00u 1:00 P # Peace
    156 Rule  US   1945 only  -   Sep 30       2:00  0    S
    157 Rule  US   1967 2006  -   Oct lastSun  2:00  0    S
    158 Rule  US   1967 1973  -   Apr lastSun  2:00  1:00 D
    159 Rule  US   1974 only  -   Jan 6        2:00  1:00 D
    160 Rule  US   1975 only  -   Feb 23       2:00  1:00 D
    161 Rule  US   1976 1986  -   Apr lastSun  2:00  1:00 D
    162 Rule  US   1987 2006  -   Apr Sun&gt;=1   2:00  1:00 D
    163 Rule  US   2007 max   -   Mar Sun&gt;=8   2:00  1:00 D
    164 Rule  US   2007 max   -   Nov Sun&gt;=1   2:00  0    S
    165 </pre>
    166   </td></tr></table></td>
    167 </tr>
    168 <tr>
    169   <th colspan="6">Reformatted a Bit</th>
    170 </tr>
    171 <tr>
    172   <th>From</th>
    173   <th>To</th>
    174   <th colspan="2">On</th>
    175   <th>At</th>
    176   <th>Action</th>
    177 </tr>
    178 <tr align="center">
    179   <td rowspan="2">1918</td>
    180   <td rowspan="2">1919</td>
    181   <td rowspan="2">last Sunday</td>
    182   <td>in March</td>
    183   <td rowspan="3">02:00 local</td>
    184   <td>go to daylight saving time</td>
    185 </tr>
    186 <tr align="center">
    187   <td>in October</td>
    188   <td>return to standard time</td>
    189 </tr>
    190 <tr align="center">
    191   <td colspan="2">1942 only</td>
    192   <td colspan="2">February 9<small><sup>th</sup></small></td>
    193   <td>go to &ldquo;war time&rdquo;</td>
    194 </tr>
    195 <tr align="center">
    196   <td colspan="2" rowspan="2">1945 only</td>
    197   <td colspan="2">August 14<small><sup>th</sup></small></td>
    198   <td>23:00 <a href="https://en.wikipedia.org/wiki/Universal_Time">UT</a></td>
    199   <td>
    200     rename &ldquo;war time&rdquo; to &ldquo;peace<br>time;&rdquo;
    201     clocks don&rsquo;t change
    202   </td>
    203 </tr>
    204 <tr align="center">
    205   <td colspan="2">September 30<small><sup>th</sup></small></td>
    206   <td rowspan="9">02:00 local</td>
    207   <td rowspan="2">return to standard time</td>
    208 </tr>
    209 <tr align="center">
    210   <td rowspan="2">1967</td>
    211   <td>2006</td>
    212   <td rowspan="2">last Sunday</td>
    213   <td>in October</td>
    214 </tr>
    215 <tr align="center">
    216   <td>1973</td>
    217   <td>in April</td>
    218   <td rowspan="6">go to daylight saving time</td>
    219 </tr>
    220 <tr align="center">
    221   <td colspan="2">1974 only</td>
    222   <td colspan="2">January 6<small><sup>th</sup></small></td>
    223 </tr>
    224 <tr align="center">
    225   <td colspan="2">1975 only</td>
    226   <td colspan="2">February 23<small><sup>rd</sup></small></td>
    227 </tr>
    228 <tr align="center">
    229   <td>1976</td>
    230   <td>1986</td>
    231   <td>last Sunday</td>
    232   <td rowspan="2">in April</td>
    233 </tr>
    234 <tr align="center">
    235   <td>1987</td>
    236   <td>2006</td>
    237   <td>first Sunday</td>
    238 </tr>
    239 <tr align="center">
    240   <td rowspan="2">2007</td>
    241   <td rowspan="2">present</td>
    242   <td colspan="2">second Sunday in March</td>
    243 </tr>
    244 <tr align="center">
    245   <td colspan="2">first Sunday in November</td>
    246   <td>return to standard time</td>
    247 </tr>
    248 </table>
    249 
    250 <p>There are two interesting things to note here.</p>
    251 
    252 <p>First, the time that something happens (in the <code>AT</code>
    253 column) is not necessarily the local wall clock time. The time can be
    254 suffixed with &lsquo;s&rsquo; (for &ldquo;standard&rdquo;) to mean
    255 local standard time (different from wall clock time when observing
    256 daylight saving time); or it can be suffixed with &lsquo;g&rsquo;,
    257 &lsquo;u&rsquo;, or &lsquo;z&rsquo;, all three of which mean the
    258 standard time at the
    259 <a href="https://en.wikipedia.org/wiki/Prime_Meridian">prime meridian</a>.
    260 &lsquo;g&rsquo; stands for &ldquo;<a
    261 href="https://en.wikipedia.org/wiki/Greenwich_Mean_Time">GMT</a>&rdquo;;
    262 &lsquo;u&rsquo; stands for &ldquo;<a
    263 href="https://en.wikipedia.org/wiki/Universal_Time">UT</a>&rdquo; or &ldquo;<a
    264 href="https://en.wikipedia.org/wiki/Coordinated_Universal_Time">UTC</a>&rdquo;
    265 (whichever was official at the time); &lsquo;z&rsquo; stands for the
    266 <a href="https://en.wikipedia.org/wiki/Nautical_time">nautical time zone</a>
    267 Z (a.k.a. &ldquo;Zulu&rdquo; which, in turn, stands for &lsquo;Z&rsquo;).
    268 The time can also be suffixed with &lsquo;w&rsquo; meaning &ldquo;wall
    269 clock time;&rdquo; but it usually isn&rsquo;t because that&rsquo;s the
    270 default.</p>
    271 
    272 <p>Second, the day in the <code>ON</code> column, in addition to
    273 &ldquo;<code>lastSun</code>&rdquo; or a particular day of the month,
    274 can have the form, &ldquo;<code>Sun&gt;=</code><i>x</i>&rdquo; or
    275 &ldquo;<code>Sun&lt;=</code><i>x</i>,&rdquo; where <i>x</i> is a day
    276 of the month. For example, &ldquo;<code>Sun&gt;=8</code>&rdquo; means
    277 &ldquo;the first Sunday on or after the eighth of the month,&rdquo; in
    278 other words, the second Sunday of the month. Furthermore, although
    279 there are no examples above, the weekday needn&rsquo;t be
    280 &ldquo;<code>Sun</code>&rdquo; in either form, but can be the usual
    281 three-character English abbreviation for any day of the week.</p>
    282 
    283 <p>And the US rules give us more examples of a couple of things
    284 already mentioned:</p>
    285 
    286 <ul>
    287 <li>The rules for changing to and from daylight saving time are
    288 actually <i>different sets</i> of rules; and the two sets can change
    289 independently. Consider, for example, that the rule for the return to
    290 standard time stayed the same from 1967 to 2006; but the rule for the
    291 transition to daylight saving time changed several times in the same
    292 period.  There can also be periods, 1946 to 1966 for example, when no
    293 rule from this group is in effect, and so either no transition
    294 happened in those years, or some other rule is in effect (perhaps a
    295 state or other more local rule).</li>
    296 
    297 <li>The <code>SAVE</code> and <code>LETTER</code> columns
    298 contain <i>steady state</i>, not transitions. Consider, for example,
    299 the transition from &ldquo;war time&rdquo; to &ldquo;peace time&rdquo;
    300 that happened on August 14, 1945. The &ldquo;1:00&rdquo; in
    301 the <code>SAVE</code> column is <i>not</i> an instruction to advance
    302 the clock an hour. It means that clocks should <i>be</i> one hour
    303 ahead of standard time, which they already are because of the previous
    304 rule, so there should be no change.</li>
    305 
    306 </ul>
    307 
    308 <p>OK, now let&rsquo;s look at a Zone record:</p>
    309 
    310 <table border="1">
    311 <tr>
    312   <th colspan="5">From the Source File</th>
    313 </tr>
    314 <tr>
    315   <td colspan="6" align="center"><table><tr><td>
    316 <pre>
    317 #Zone       NAME      GMTOFF   RULES FORMAT [UNTIL]
    318 Zone  America/Chicago -5:50:36 -       LMT  1883 Nov 18 12:09:24
    319                       -6:00    US      C%sT 1920
    320                       -6:00    Chicago C%sT 1936 Mar  1  2:00
    321                       -5:00    -       EST  1936 Nov 15  2:00
    322                       -6:00    Chicago C%sT 1942
    323                       -6:00    US      C%sT 1946
    324                       -6:00    Chicago C%sT 1967
    325                       -6:00    US      C%sT
    326 </pre>
    327   </td></tr></table></td>
    328 </tr>
    329 <tr>
    330   <th colspan="5">Columns Renamed</th>
    331 </tr>
    332 <tr>
    333   <th rowspan="2">Standard Offset<br>
    334     from <a href="https://en.wikipedia.org/wiki/Prime_Meridian">Prime
    335     Meridian</a></th>
    336   <th rowspan="2">Daylight<br>Saving Time</th>
    337   <th rowspan="2">Abbreviation(s)</th>
    338   <th colspan="2">Ending at Local Time</th>
    339 </tr>
    340 <tr>
    341   <th>Date</th>
    342   <th>Time</th>
    343 </tr>
    344 <tr align="center">
    345   <td>&minus;5:50:36</td>
    346   <td>not observed</td>
    347   <td>LMT</td>
    348   <td>1883-11-18</td>
    349   <td>12:09:24</td>
    350 </tr>
    351 <tr align="center">
    352   <td rowspan="2">&minus;6:00:00</td>
    353   <td>US rules</td>
    354   <td rowspan="2">CST or CDT</td>
    355   <td>1920-01-01</td>
    356   <td>00:00:00</td>
    357 </tr>
    358 <tr align="center">
    359   <td>Chicago rules</td>
    360   <td>1936-03-01</td>
    361   <td rowspan="2">02:00:00</td>
    362 </tr>
    363 <tr align="center">
    364   <td>&minus;5:00:00</td>
    365   <td>not observed</td>
    366   <td>EST</td>
    367   <td>1936-11-15</td>
    368 </tr>
    369 <tr align="center">
    370   <td rowspan="4">&minus;6:00:00</td>
    371   <td>Chicago rules</td>
    372   <td>CST or CDT</td>
    373   <td>1942-01-01</td>
    374   <td rowspan="3">00:00:00</td>
    375 </tr>
    376 <tr align="center">
    377   <td>US rules</td>
    378   <td>CST, CWT or CPT</td>
    379   <td>1946-01-01</td>
    380 </tr>
    381 <tr align="center">
    382   <td>Chicago rules</td>
    383   <td rowspan="2">CST or CDT</td>
    384   <td>1967-01-01</td>
    385 </tr>
    386 <tr align="center">
    387   <td>US rules</td>
    388   <td colspan="2">&mdash;</td>
    389 </tr>
    390 </table>
    391 
    392 <p>There are a couple of interesting differences between Zones and Rules.</p>
    393 
    394 <p>First, and somewhat trivially, whereas Rules are considered to
    395 contain one or more records, a Zone is considered to be a single
    396 record with zero or more <i>continuation lines</i>. Thus, the keyword,
    397 &ldquo;<code>Zone</code>,&rdquo; and the zone name are not
    398 repeated. The last line is the one without anything in
    399 the <code>[UNTIL]</code> column.</p>
    400 
    401 <p>Second, and more fundamentally, each line of a Zone represents a
    402 steady state, not a transition between states. The state exists from
    403 the date and time in the previous line&rsquo;s <code>[UNTIL]</code>
    404 column up to the date and time in the current
    405 line&rsquo;s <code>[UNTIL]</code> column. In other words, the date and
    406 time in the <code>[UNTIL]</code> column is the instant that separates
    407 this state from the next. Where that would be ambiguous because
    408 we&rsquo;re setting our clocks back, the <code>[UNTIL]</code> column
    409 specifies the first occurrence of the instant. The state specified by
    410 the last line, the one without anything in the <code>[UNTIL]</code>
    411 column, continues to the present.</p>
    412 
    413 <p>The first line typically specifies the mean solar time observed
    414 before the introduction of standard time. Since there&rsquo;s no line before
    415 that, it has no beginning. <code>8-) </code> For some places near the <a
    416 href="https://en.wikipedia.org/wiki/International_Date_Line">International
    417 Date Line</a>, the first <i>two</i> lines will show solar times
    418 differing by 24 hours; this corresponds to a movement of the Date
    419 Line.  For example:</p>
    420 
    421 <pre>
    422 #Zone NAME          GMTOFF   RULES FORMAT [UNTIL]
    423 Zone America/Juneau 15:02:19 -     LMT    1867 Oct 18
    424                     -8:57:41 -     LMT    ...
    425 </pre>
    426 
    427 <p>When Alaska was purchased from Russia in 1867, the Date Line moved
    428 from the Alaska/Canada border to the Bering Strait; and the time in
    429 Alaska was then 24 hours earlier than it had
    430 been. <code>&lt;aside&gt;</code>(6 October in the Julian calendar,
    431 which Russia was still using then for religious reasons, was followed
    432 by <i>a second instance of the same day with a different name</i>, 18
    433 October in the Gregorian calendar. Isn&rsquo;t civil time
    434 wonderful? <code>8-)</code>)<code>&lt;/aside&gt;</code></p>
    435 
    436 <p>The abbreviation, &ldquo;LMT&rdquo; stands for &ldquo;local mean
    437 time&rdquo;, which is an invention of
    438 the <a href="https://en.wikipedia.org/wiki/Tz_database">tz
    439 database</a> and was probably never actually used during the
    440 period. Furthermore, the value is almost certainly wrong except in the
    441 archetypal place after which the zone is named. (The tz database
    442 usually doesn&rsquo;t provide a separate Zone record for places where
    443 nothing significant happened after 1970.)</p>
    444 
    445 <p>The <code>RULES</code> column tells us whether daylight saving time is being observed:
    446 <ul>
    447 <li>A hyphen, a kind of null value, means that we have not set our
    448 clocks ahead of standard time.</li>
    449 
    450 <li>An amount of time (usually but not necessarily &ldquo;1:00&rdquo;
    451 meaning one hour) means that we have set our clocks ahead by that
    452 amount.</li>
    453 
    454 <li>Some alphabetic string means that we <i>might have</i> set our
    455 clocks ahead; and we need to check the rule the name of which is the
    456 given alphabetic string.</li>
    457 </ul>
    458 
    459 <p>An example of a specific amount of time is:</p>
    460 <pre>
    461 #Zone NAME            GMTOFF RULES FORMAT [UNTIL]
    462 Zone Pacific/Honolulu ...                 1933 Apr 30  2:00
    463                       -10:30 1:00  HDT    1933 May 21 12:00
    464                       ...
    465 </pre>
    466 
    467 <p>Hawaii tried daylight saving time for three weeks in 1933 and
    468 decided they didn&rsquo;t like it. <code>8-) </code>Note that
    469 the <code>GMTOFF</code> column always contains the standard time
    470 offset, so the wall clock time during this period was GMT &minus;
    471 10:30 + 1:00 = GMT &minus; 9:30.</p>
    472 
    473 <p>The <code>FORMAT</code> column specifies the usual abbreviation of
    474 the time zone name. It can have one of three forms:</p>
    475 <ul>
    476 
    477 <li>a string of three or more characters that are either ASCII alphanumerics,
    478 &ldquo;<code>+</code>&rdquo;, or &ldquo;<code>-</code>&rdquo;,
    479 in which case that&rsquo;s the abbreviation</li>
    480 
    481 <li>a pair of strings separated by a slash
    482 (&lsquo;<code>/</code>&rsquo;), in which case the first string is the
    483 abbreviation for the standard time name and the second string is the
    484 abbreviation for the daylight saving time name</li>
    485 
    486 <li>a string containing &ldquo;<code>%s</code>,&rdquo; in which case
    487 the &ldquo;<code>%s</code>&rdquo; will be replaced by the text in the
    488 appropriate Rule&rsquo;s <code>LETTER</code> column</li>
    489 </ul>
    490 
    491 <p>The last two make sense only if there&rsquo;s a named rule in effect.</p>
    492 
    493 <p>An example of a slash is:</p>
    494 <pre>
    495 #Zone NAME          GMTOFF RULES FORMAT  [UNTIL]
    496 Zone  Europe/London ...                  1996
    497                     0:00   EU    GMT/BST
    498 </pre>
    499 
    500 <p>The current time in the UK is called either Greenwich mean time or
    501 British summer time.</p>
    502 
    503 <p>One wrinkle, not fully explained in <code>zic.8.txt</code>, is what
    504 happens when switching to a named rule. To what values should
    505 the <code>SAVE</code> and <code>LETTER</code> data be initialized?</p>
    506 
    507 <ul>
    508 <li>If at least one transition has happened, use
    509 the <code>SAVE</code> and <code>LETTER</code> data from the most
    510 recent.</li>
    511 
    512 <li>If switching to a named rule before any transition has happened,
    513 assume standard time (<code>SAVE</code> zero), and use
    514 the <code>LETTER</code> data from the earliest transition with
    515 a <code>SAVE</code> of zero.
    516 
    517 </ul>
    518 
    519 <p>And three last things about the <code>FORMAT</code> column:</p>
    520 <ul>
    521 
    522 <li>The <a href="https://en.wikipedia.org/wiki/Tz_database">tz
    523 database</a> gives abbreviations for time zones in <i>popular
    524 usage</i>, which is not necessarily &ldquo;correct&rdquo; by law. For
    525 example, the last line in
    526 <code>Zone</code> <code>Pacific/Honolulu</code> (shown below) gives
    527 &ldquo;HST&rdquo; for &ldquo;Hawaii standard time&rdquo; even though the
    528 <a href="https://www.law.cornell.edu/uscode/text/15/263">legal</a>
    529 name for that time zone is &ldquo;Hawaii-Aleutian standard time.&rdquo;
    530 This author has read that there are also some places in Australia where
    531 popular time zone names differ from the legal ones.
    532 
    533 <li>No attempt is made to <a
    534 href="https://en.wikipedia.org/wiki/Internationalization_and_localization">localize</a>
    535 the abbreviations. They are intended to be the values returned through the
    536 <code>"%Z"</code> format specifier to
    537 <a href="https://en.wikipedia.org/wiki/C_(programming_language)">C</a>&rsquo;s
    538 <a href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html"><code>strftime</code></a>
    539 function in the
    540 <a href="http://kirste.userpage.fu-berlin.de/chemnet/use/info/libc/libc_19.html#SEC324">&ldquo;C&rdquo; locale</a>.
    541 
    542 <li>If there is no generally-accepted abbreviation for a time zone,
    543 a numeric offset is used instead, e.g., <code>+07</code> for 7 hours
    544 ahead of Greenwich. By convention, <code>-00</code> is used in a
    545 zone while uninhabited, where the offset is zero but in some sense
    546 the true offset is undefined.
    547 </ul>
    548 
    549 <p>As a final example, here&rsquo;s the complete history for Hawaii:</p>
    550 
    551 <table border="1">
    552 <tr>
    553   <th colspan="6">Relevant Excerpts from the US Rules</th>
    554 </tr>
    555 <tr>
    556   <td colspan="6" align="center"><table><tr><td>
    557 <pre>
    558 #Rule NAME FROM TO   TYPE IN  ON      AT     SAVE LETTER/S
    559 Rule  US   1918 1919 -    Oct lastSun  2:00  0    S
    560 Rule  US   1942 only -    Feb  9       2:00  1:00 W # War
    561 Rule  US   1945 only -    Aug 14      23:00u 1:00 P # Peace
    562 Rule  US   1945 only -    Sep lastSun  2:00  0    S
    563 </pre>
    564   </td></tr></table></td>
    565 </tr>
    566 <tr>
    567   <th colspan="6">The Zone Record</th>
    568 </tr>
    569 <tr>
    570   <td colspan="6" align="center"><table><tr><td>
    571 <pre>
    572 #Zone NAME            GMTOFF    RULES FORMAT [UNTIL]
    573 Zone Pacific/Honolulu -10:31:26 -     LMT    1896 Jan 13 12:00
    574                       -10:30    -     HST    1933 Apr 30  2:00
    575                       -10:30    1:00  HDT    1933 May 21  2:00
    576                       -10:30    US    H%sT   1947 Jun  8  2:00
    577                       -10:00    -     HST
    578 </pre>
    579   </td></tr></table></td>
    580 </tr>
    581 <tr>
    582   <th colspan="6">What We Infer</th>
    583 </tr>
    584 <tr>
    585   <th rowspan="2">Wall-Clock<br>Offset from<br>Prime Meridian</th>
    586   <th rowspan="2">Adjust<br>Clocks</th>
    587   <th colspan="2">Time Zone</th>
    588   <th colspan="2">Ending at Local Time</th>
    589 </tr>
    590 <tr>
    591   <th>Abbrv.</th>
    592   <th>Name</th>
    593   <th>Date</th>
    594   <th>Time</th>
    595 </tr>
    596 <tr align="center">
    597   <td>&minus;10:31:26</td>
    598   <td>&mdash;</td>
    599   <td>LMT</td>
    600   <td>local mean time</td>
    601   <td>1896-01-13</td>
    602   <td>12:00</td>
    603 </tr>
    604 <tr align="center">
    605   <td>&minus;10:30</td>
    606   <td>+0:01:26</td>
    607   <td>HST</td>
    608   <td>Hawaii standard time</td>
    609   <td>1933-04-30</td>
    610   <td>02:00</td>
    611 </tr>
    612 <tr align="center">
    613   <td>&minus;9:30</td>
    614   <td>+1:00</td>
    615   <td>HDT</td>
    616   <td>Hawaii daylight time</td>
    617   <td>1933-05-21</td>
    618   <td>12:00</td>
    619 </tr>
    620 <tr align="center">
    621   <td>&minus;10:30&sup1;</td>
    622   <td>&minus;1:00&sup1;</td>
    623   <td>HST&sup1;</td>
    624   <td>Hawaii standard time</td>
    625   <td>1942-02-09</td>
    626   <td>02:00</td>
    627 </tr>
    628 <tr align="center">
    629   <td rowspan="2">&minus;9:30</td>
    630   <td>+1:00</td>
    631   <td>HWT</td>
    632   <td>Hawaii war time</td>
    633   <td>1945-08-14</td>
    634   <td>13:30&sup2;</td>
    635 </tr>
    636 <tr align="center">
    637   <td>0</td>
    638   <td>HPT</td>
    639   <td>Hawaii peace time</td>
    640   <td>1945-09-30</td>
    641   <td rowspan="2">02:00</td>
    642 </tr>
    643 <tr align="center">
    644   <td>&minus;10:30</td>
    645   <td>&minus;1:00</td>
    646   <td rowspan="2">HST</td>
    647   <td rowspan="2">Hawaii standard time</td>
    648   <td>1947-06-08</td>
    649 </tr>
    650 <tr align="center">
    651   <td>&minus;10:00&sup3;</td>
    652   <td>+0:30&sup3;</td>
    653   <td colspan="2">&mdash;</td>
    654 </tr>
    655 <tr>
    656   <td colspan="6">
    657     &sup1;Switching to US rules&hellip;most recent transition (in 1919) was to standard time
    658   </td>
    659 </tr>
    660 <tr>
    661   <td colspan="6">
    662     &sup2;23:00 <a href="https://en.wikipedia.org/wiki/Universal_Time">UT</a>
    663     + (&minus;9:30) = 13:30 local
    664   </td>
    665 </tr>
    666 <tr>
    667   <td colspan="6">
    668     &sup3;Since <a href="https://en.wikipedia.org/wiki/ISO_8601">1947&ndash;06&ndash;08T12:30Z</a>,
    669     the civil time in Hawaii has been
    670     <a href="https://en.wikipedia.org/wiki/Universal_Time">UT</a>/<a href="https://en.wikipedia.org/wiki/Coordinated_Universal_Time">UTC</a>
    671     &minus; 10:00 year-round.
    672   </td>
    673 </tr>
    674 </table>
    675 
    676 <p>There will be a short quiz later. <code>8-)</code></p>
    677 
    678 <hr>
    679 <address>
    680 This web page is in the public domain, so clarified as of
    681 2015-10-20 by Bill Seymour.
    682 <br>
    683 All suggestions and corrections will be welcome; all flames will be amusing.
    684 Mail to was at pobox dot com.
    685 </address>
    686 </body>
    687 </html>
    688