diff options
Diffstat (limited to 'tz-how-to.html')
-rw-r--r-- | tz-how-to.html | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/tz-how-to.html b/tz-how-to.html index bf3e86f..e1e28f2 100644 --- a/tz-how-to.html +++ b/tz-how-to.html @@ -17,7 +17,7 @@ td.footnote {text-align: left;} <h2>How to Read the <a href="https://en.wikipedia.org/wiki/Tz_database">tz Database</a> Source Files</h2> <h3>by Bill Seymour</h3> -<p>This page uses the <code>America/Chicago</code> and +<p>This guide uses the <code>America/Chicago</code> and <code>Pacific/Honolulu</code> zones as examples of how to infer times of day from the <a href="tz-link.html">tz database</a> source files. It might be helpful, but not absolutely necessary, @@ -25,7 +25,10 @@ for the reader to have already downloaded the latest release of the database and become familiar with the basic layout of the data files. The format is explained in the “man page” for the zic compiler, <code>zic.8.txt</code>, in -the <code>code</code> subdirectory.</p> +the <code>code</code> subdirectory. +Although this guide covers many of the common cases, it is not a +complete summary of what zic accepts; the man page is the +authoritative reference.</p> <p>We’ll begin by talking about the rules for changing between standard and daylight saving time since we’ll need that information when we talk @@ -111,7 +114,8 @@ representable year. <p>The next column, <code>-</code>, is reserved; for compatibility with earlier releases, it always contains a hyphen, which acts as a kind of null value. Prior to the 2020b release, it was called the <code>TYPE</code> field, though -it was never used in the main data. An obsolescent supplementary file used the +it had not been used in the main data since the 2000e release. +An obsolescent supplementary file used the field as a proof-of-concept to allow <code>zic</code> to apply a given Rule line only to certain “types” of years within the specified range as dictated by the output of a separate script, such as: only years which would @@ -490,21 +494,26 @@ offset, so the local (wall clock) time during this period was GMT − 10:30 + 1:00 = GMT − 9:30.</p> <p>The <code>FORMAT</code> column specifies the usual abbreviation of -the time zone name. It can have one of three forms:</p> +the time zone name. It should have one of four forms:</p> <ul> -<li>a string of three or more characters that are either ASCII alphanumerics, -“<code>+</code>”, or “<code>-</code>”, -in which case that’s the abbreviation</li> +<li>a time zone abbreviation that is a string of three or more +characters that are either ASCII alphanumerics, +“<code>+</code>”, or “<code>-</code>”</li> -<li>a pair of strings separated by a slash +<li>the string “%z”, in which case the +“<code>%z</code>” will be replaced by a numeric time zone +abbreviation</li> + +<li>a pair of time zone abbreviations separated by a slash (‘<code>/</code>’), in which case the first string is the abbreviation for the standard time name and the second string is the abbreviation for the daylight saving time name</li> -<li>a string containing “<code>%s</code>,” in which case +<li>a string containing “<code>%s</code>”, in which case the “<code>%s</code>” will be replaced by the text in the -appropriate Rule’s <code>LETTER</code> column</li> +appropriate Rule’s <code>LETTER</code> column, and the resulting +string should be a time zone abbreviation</li> </ul> <p>The last two make sense only if there’s a named rule in effect.</p> |