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