Changeset View
Changeset View
Standalone View
Standalone View
contrib/tzcode/tz-how-to.html
Show First 20 Lines • Show All 542 Lines • ▼ Show 20 Lines | |||||
a <code>SAVE</code> of zero. | a <code>SAVE</code> of zero. | ||||
</ul> | </ul> | ||||
<p>And three last things about the <code>FORMAT</code> column:</p> | <p>And three last things about the <code>FORMAT</code> column:</p> | ||||
<ul> | <ul> | ||||
<li>The <a href="https://en.wikipedia.org/wiki/Tz_database">tz | <li>The <a href="https://en.wikipedia.org/wiki/Tz_database">tz | ||||
database</a> gives abbreviations for time zones in <i>popular | database</a> gives abbreviations for time zones | ||||
usage</i>, which is not necessarily “correct” by law. For | in popular English-language usage. For | ||||
example, the last line in | example, the last line in | ||||
<code>Zone</code> <code>Pacific/Honolulu</code> (shown below) gives | <code>Zone</code> <code>Pacific/Honolulu</code> (shown below) gives | ||||
“HST” for “Hawaii standard time” even though the | “HST” for “Hawaii standard time” even though the | ||||
<a href="https://www.law.cornell.edu/uscode/text/15/263">legal</a> | <a href="https://www.law.cornell.edu/uscode/text/15/263">legal</a> | ||||
name for that time zone is “Hawaii-Aleutian standard time.” | name for that time zone is “Hawaii-Aleutian standard time.” | ||||
This author has read that there are also some places in Australia where | This author has read that there are also some places in Australia where | ||||
popular time zone names differ from the legal ones. | popular time zone names differ from the legal ones. | ||||
<li>No attempt is made to <a | <li>No attempt is made to <a | ||||
href="https://en.wikipedia.org/wiki/Internationalization_and_localization">localize</a> | href="https://en.wikipedia.org/wiki/Internationalization_and_localization">localize</a> | ||||
the abbreviations. They are intended to be the values returned through the | the abbreviations. They are intended to be the values returned through the | ||||
<code>"%Z"</code> format specifier to | <code>"%Z"</code> format specifier to | ||||
<a href="https://en.wikipedia.org/wiki/C_(programming_language)">C</a>’s | <a href="https://en.wikipedia.org/wiki/C_(programming_language)">C</a>’s | ||||
<a href="https://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html"><code>strftime</code></a> | <a href="https://pubs.opengroup.org/onlinepubs/9699919799/functions/strftime.html"><code>strftime</code></a> | ||||
function in the | function in the | ||||
<a href="https://kirste.userpage.fu-berlin.de/chemnet/use/info/libc/libc_19.html#SEC324">“C” locale</a>. | <a href="https://kirste.userpage.fu-berlin.de/chemnet/use/info/libc/libc_19.html#SEC324">“C” locale</a>. | ||||
<li>If there is no generally-accepted abbreviation for a time zone, | <li>If there is no generally accepted abbreviation for a time zone, | ||||
a numeric offset is used instead, e.g., <code>+07</code> for 7 hours | a numeric offset is used instead, e.g., <code>+07</code> for 7 hours | ||||
ahead of Greenwich. By convention, <code>-00</code> is used in a | ahead of Greenwich. By convention, <code>-00</code> is used in a | ||||
zone while uninhabited, where the offset is zero but in some sense | zone while uninhabited, where the offset is zero but in some sense | ||||
the true offset is undefined. | the true offset is undefined. | ||||
</ul> | </ul> | ||||
<p>As a final example, here’s the complete history for Hawaii:</p> | <p>As a final example, here’s the complete history for Hawaii:</p> | ||||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |