From dfca6b5ed7757d91368c5aace6705a1678825db7 Mon Sep 17 00:00:00 2001 From: Edwin Groothuis Date: Thu, 9 Sep 2010 07:48:01 +0000 Subject: Vendor import of tzcode2010l --- libc/stdtime/localtime.c | 26 ++++++++++---------------- unused/tz-link.htm | 15 ++++++++++++++- zic/zdump.c | 2 +- 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/libc/stdtime/localtime.c b/libc/stdtime/localtime.c index f5833e85b7904..d397472dcdfdd 100644 --- a/libc/stdtime/localtime.c +++ b/libc/stdtime/localtime.c @@ -5,7 +5,7 @@ #ifndef lint #ifndef NOID -static char elsieid[] = "@(#)localtime.c 8.13"; +static char elsieid[] = "@(#)localtime.c 8.14"; #endif /* !defined NOID */ #endif /* !defined lint */ @@ -274,34 +274,28 @@ settzname(void) return; } #endif /* defined ALL_STATE */ - for (i = 0; i < sp->typecnt; ++i) { - register const struct ttinfo * const ttisp = &sp->ttis[i]; + /* + ** And to get the latest zone names into tzname. . . + */ + for (i = 0; i < sp->timecnt; ++i) { + register const struct ttinfo * const ttisp = + &sp->ttis[ + sp->types[i]]; tzname[ttisp->tt_isdst] = &sp->chars[ttisp->tt_abbrind]; #ifdef USG_COMPAT if (ttisp->tt_isdst) daylight = 1; - if (i == 0 || !ttisp->tt_isdst) + if (!ttisp->tt_isdst) timezone = -(ttisp->tt_gmtoff); #endif /* defined USG_COMPAT */ #ifdef ALTZONE - if (i == 0 || ttisp->tt_isdst) + if (ttisp->tt_isdst) altzone = -(ttisp->tt_gmtoff); #endif /* defined ALTZONE */ } /* - ** And to get the latest zone names into tzname. . . - */ - for (i = 0; i < sp->timecnt; ++i) { - register const struct ttinfo * const ttisp = - &sp->ttis[ - sp->types[i]]; - - tzname[ttisp->tt_isdst] = - &sp->chars[ttisp->tt_abbrind]; - } - /* ** Finally, scrub the abbreviations. ** First, replace bogus characters. */ diff --git a/unused/tz-link.htm b/unused/tz-link.htm index 8c094824d95dd..26235100b98b9 100644 --- a/unused/tz-link.htm +++ b/unused/tz-link.htm @@ -18,7 +18,7 @@

Sources for Time Zone and Daylight Saving Time Data

-@(#)tz-link.htm 8.26 +@(#)tz-link.htm 8.30

This file is in the public domain, so clarified as of @@ -89,6 +89,8 @@ the code is in the file tzcodeC.tar.gz, where C is the code's version; similarly, the data are in tzdataD.tar.gz, where D is the data's version. +Each version is a four-digit year followed by lower-case letters +(a through z, then za through zz, then zza through zzz, and so on). The following shell commands download these files to a GNU/Linux or similar host; @@ -349,6 +351,17 @@ href="http://unicode.org/cldr/data/diff/supplemental/windows_tzid.html">Windows → Tzid table maintained by the CLDR data mentioned below. +

  • + +http://code.google.com/p/tzdata/ + +provides programming-language-specific representations of timezone +data. Currently this includes XML, PHP, Ruby, Javascript, JSON and CSV +formatted data. The repository is updated as soon as the FTP +distribution is updated. All data can be downloaded as a zip and/or it +can be obtained/synced via anonymous SVN. Data is made available under +the MIT license. (From Rich Tibbett.) +
  • Maps