summaryrefslogtreecommitdiff
path: root/timezone
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-10-12 06:19:23 +0000
committerUlrich Drepper <drepper@redhat.com>2004-10-12 06:19:23 +0000
commitdaa6fd8885a39a74a17b5716dfb3b9654912a130 (patch)
tree23906d7043f545664e8e7e39a70b3c336f96fdc3 /timezone
parentf448d449c7713a4b1aadf21e06aa588e329210d0 (diff)
downloadglibc-daa6fd8885a39a74a17b5716dfb3b9654912a130.tar.gz
* timezone/asia: Update from tzdata2004e. * timezone/southamerica: Likewise. * timezone/private.h: Update from tzcode2004e. * timezone/zdump.c: Likewise.
Diffstat (limited to 'timezone')
-rw-r--r--timezone/asia22
-rw-r--r--timezone/private.h13
-rw-r--r--timezone/southamerica45
-rw-r--r--timezone/zdump.c73
4 files changed, 123 insertions, 30 deletions
diff --git a/timezone/asia b/timezone/asia
index 4417134dac..3c2c1a1868 100644
--- a/timezone/asia
+++ b/timezone/asia
@@ -1,4 +1,4 @@
-# @(#)asia 7.75
+# @(#)asia 7.77
# This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to
@@ -761,6 +761,26 @@ Zone Asia/Jerusalem 2:20:56 - LMT 1880
# direction is expected until the latter part of 2004 which is a long
# time off in terms of Israeli politics.
+# (2004-09-20):
+# The latest rumour, however, is that in 2005, when the clock changes to
+# Daylight Saving Time (date as yet unknown), the move will be a two-hour leap
+# forward (from UTC+0200 to UTC+0400) and then, in the fall, the clock will
+# move back only an hour to UTC+0300 thus effectively moving Israel's timezone
+# from UTC+0200 to UTC+0300. However, no actual draft has been put before the
+# Knesset (Israel's Parliament) though the intention is to do so this
+# month [2004-09].
+
+# (2004-09-26):
+# Even though the draft law for the above did pass the Ministerial Committee
+# for Legislative Matters three months ago, it was voted down in today's
+# Cabinet meeting. The current suggestion is to keep the current timezone at
+# UTC+0200 but have an extended period of Daylight Saving Time (UTC+0300) from
+# the beginning of Passover holiday in the spring to after the Tabernacle
+# holiday in the fall (i.e. the dates of which are governed by the Hebrew
+# calendar but this means at least 184 days of DST). However, this is only a
+# suggestion that was raised in today's cabinet meeting and has not yet been
+# drafted.
+
###############################################################################
diff --git a/timezone/private.h b/timezone/private.h
index c8f4548683..57663052f0 100644
--- a/timezone/private.h
+++ b/timezone/private.h
@@ -21,7 +21,7 @@
#ifndef lint
#ifndef NOID
-static char privatehid[] = "@(#)private.h 7.53";
+static char privatehid[] = "@(#)private.h 7.54";
#endif /* !defined NOID */
#endif /* !defined lint */
@@ -190,11 +190,22 @@ extern int unlink P((const char * filename));
** But some newer errno.h implementations define it as a macro.
** Fix the former without affecting the latter.
*/
+
#ifndef errno
extern int errno;
#endif /* !defined errno */
/*
+** Some time.h implementations don't declare asctime_r.
+** Others might define it as a macro.
+** Fix the former without affecting the latter.
+*/
+
+#ifndef asctime_r
+extern char * asctime_r();
+#endif
+
+/*
** Private function declarations.
*/
char * icalloc P((int nelem, int elsize));
diff --git a/timezone/southamerica b/timezone/southamerica
index 13bd5270e8..912491049b 100644
--- a/timezone/southamerica
+++ b/timezone/southamerica
@@ -1,4 +1,4 @@
-# @(#)southamerica 7.52
+# @(#)southamerica 7.54
# This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to
@@ -186,6 +186,20 @@ Rule Arg 2000 only - Mar Sun>=1 0:00 0 -
# contains a contradiction. I would give more credence to the Saturday/Sunday
# date than the "three days earlier" phrase, and conclude that Tierra del
# Fuego set its clocks back at 2004-05-30 00:00.
+#
+# From Steffen Thorsen (2004-10-05):
+# The previous law 7210 which changed the province of Mendoza's time zone
+# back in May have been modified slightly in a new law 7277, which set the
+# new end date to 2004-09-26 (original date was 2004-10-17).
+# http://www.gobernac.mendoza.gov.ar/boletin/pdf/20040924-27244-normas.pdf
+#
+# From Mariano Absatz (2004-10-05):
+# San Juan changed from UTC-03:00 to UTC-04:00 at midnight between
+# Sunday, May 30th and Monday, May 31st. It changed back to UTC-03:00
+# at midnight between Saturday, July 24th and Sunday, July 25th....
+# http://www.sanjuan.gov.ar/prensa/archivo/000329.html
+# http://www.sanjuan.gov.ar/prensa/archivo/000426.html
+# http://www.sanjuan.gov.ar/prensa/archivo/000441.html
# Unless otherwise specified, data are from Shanks through 1992, from
# the IATA otherwise. As noted below, Shanks says that
@@ -261,8 +275,8 @@ Zone America/Argentina/San_Juan -4:34:04 - LMT 1894 Oct 31
-4:00 - WART 1991 May 7
-3:00 Arg AR%sT 1999 Oct 3
-4:00 Arg AR%sT 2000 Mar 3
- -3:00 - ART 2004 Jun 1
- -4:00 - WART 2004 Oct 17
+ -3:00 - ART 2004 May 31
+ -4:00 - WART 2004 Jul 25
-3:00 - ART
#
# Jujuy (JY)
@@ -306,7 +320,7 @@ Zone America/Argentina/Mendoza -4:35:16 - LMT 1894 Oct 31
-3:00 Arg AR%sT 1999 Oct 3
-4:00 Arg AR%sT 2000 Mar 3
-3:00 - ART 2004 May 23
- -4:00 - WART 2004 Oct 17
+ -4:00 - WART 2004 Sep 26
-3:00 - ART
#
# Chubut (CH)
@@ -420,6 +434,11 @@ Zone America/La_Paz -4:32:36 - LMT 1890
# the Government decided to postpone DST, instead of changing the Constitution
# (maybe, for the next elections, it will be possible to change the clock)...
+# From Rodrigo Severo (2004-10-04):
+# It's just the biannual change made necessary by the much hyped, supposedly
+# modern Brazilian eletronic voting machines which, apparently, can't deal
+# with a time change between the first and the second rounds of the elections.
+
# From Paul Eggert (2002-10-10):
# The official decrees referenced below are mostly taken from
# <a href="http://pcdsh01.on.br/DecHV.html">
@@ -556,11 +575,15 @@ Rule Brazil 2001 max - Feb Sun>=15 0:00 0 -
Rule Brazil 2002 only - Nov 3 0:00 1:00 S
# Decree 4,844 (2003-09-24; corrected 2003-09-26) repeals DST in BA, MT, TO.
# <a href="http://www.presidencia.gov.br/CCIVIL/decreto/2003/D4844.htm"></a>
-Rule Brazil 2003 max - Oct Sun>=15 0:00 1:00 S
+Rule Brazil 2003 only - Oct 19 0:00 1:00 S
+# Decree 5,223 (2004-10-01) reestablishes DST in MT.
+# <a href="http://www.planalto.gov.br/ccivil_03/_Ato2004-2006/2004/Decreto/D5223.htm"></a>
+Rule Brazil 2004 only - Nov 2 0:00 1:00 S
# The latest ruleset listed above says that the following states observe DST:
-# DF, ES, GO, MG, MS, PR, RJ, RS, SC, SP.
+# DF, ES, GO, MG, MS, MT, PR, RJ, RS, SC, SP.
#
-# For dates after mid-2004, the above rules with TO="max" are guesses
+Rule Brazil 2005 max - Oct Sun>=15 0:00 1:00 S
+# For dates after mid-2005, the above rules with TO="max" are guesses
# and are quite possibly wrong, but are more likely than no DST at all.
@@ -648,7 +671,8 @@ Zone America/Campo_Grande -3:38:28 - LMT 1914
# Mato Grosso (MT)
Zone America/Cuiaba -3:44:20 - LMT 1914
-4:00 Brazil AM%sT 2003 Sep 24
- -4:00 - AMT
+ -4:00 - AMT 2004 Oct 4
+ -4:00 Brazil AM%sT
#
# west Para (PA), Rondonia (RO)
# West Para includes Altamira, Oribidos, Prainha, Oriximina, and Santarem.
@@ -1029,6 +1053,11 @@ Rule Uruguay 1990 1992 - Mar Sun>=1 0:00 0 -
Rule Uruguay 1990 1991 - Oct Sun>=21 0:00 1:00 S
Rule Uruguay 1992 only - Oct 18 0:00 1:00 S
Rule Uruguay 1993 only - Feb 28 0:00 0 -
+# From Eduardo Cota (2004-09-20):
+# The uruguayan government has decreed a change in the local time....
+# http://www.presidencia.gub.uy/decretos/2004091502.htm
+Rule Uruguay 2004 only - Sep Sun>=15 0:00 1:00 S
+Rule Uruguay 2005 only - Mar Sun>=8 0:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Montevideo -3:44:44 - LMT 1898 Jun 28
-3:44:44 - MMT 1920 May 1 # Montevideo MT
diff --git a/timezone/zdump.c b/timezone/zdump.c
index 9faeaf21b2..20bb916822 100644
--- a/timezone/zdump.c
+++ b/timezone/zdump.c
@@ -1,4 +1,4 @@
-static char elsieid[] = "@(#)zdump.c 7.31";
+static char elsieid[] = "@(#)zdump.c 7.40";
/*
** This code has been made independent of the rest of the time
@@ -64,16 +64,15 @@ static char elsieid[] = "@(#)zdump.c 7.31";
#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)
#endif /* !defined isleap */
-#if HAVE_GETTEXT - 0
+#if HAVE_GETTEXT
#include "locale.h" /* for setlocale */
#include "libintl.h"
-#endif /* HAVE_GETTEXT - 0 */
+#endif /* HAVE_GETTEXT */
#ifndef GNUC_or_lint
#ifdef lint
#define GNUC_or_lint
-#endif /* defined lint */
-#ifndef lint
+#else /* !defined lint */
#ifdef __GNUC__
#define GNUC_or_lint
#endif /* defined __GNUC__ */
@@ -83,8 +82,7 @@ static char elsieid[] = "@(#)zdump.c 7.31";
#ifndef INITIALIZE
#ifdef GNUC_or_lint
#define INITIALIZE(x) ((x) = 0)
-#endif /* defined GNUC_or_lint */
-#ifndef GNUC_or_lint
+#else /* !defined GNUC_or_lint */
#define INITIALIZE(x)
#endif /* !defined GNUC_or_lint */
#endif /* !defined INITIALIZE */
@@ -96,11 +94,11 @@ static char elsieid[] = "@(#)zdump.c 7.31";
*/
#ifndef _
-#if HAVE_GETTEXT - 0
+#if HAVE_GETTEXT
#define _(msgid) gettext(msgid)
-#else /* !(HAVE_GETTEXT - 0) */
+#else /* !HAVE_GETTEXT */
#define _(msgid) msgid
-#endif /* !(HAVE_GETTEXT - 0) */
+#endif /* !HAVE_GETTEXT */
#endif /* !defined _ */
#ifndef TZ_DOMAIN
@@ -110,8 +108,7 @@ static char elsieid[] = "@(#)zdump.c 7.31";
#ifndef P
#ifdef __STDC__
#define P(x) x
-#endif /* defined __STDC__ */
-#ifndef __STDC__
+#else /* !defined __STDC__ */
#define P(x) ()
#endif /* !defined __STDC__ */
#endif /* !defined P */
@@ -129,6 +126,7 @@ static time_t hunt P((char * name, time_t lot, time_t hit));
static size_t longest;
static char * progname;
static void show P((char * zone, time_t t, int v));
+static void dumptime P((const struct tm * tmp));
int
main(argc, argv)
@@ -150,14 +148,13 @@ char * argv[];
struct tm newtm;
INITIALIZE(cuttime);
-#if HAVE_GETTEXT - 0
- (void) setlocale(LC_CTYPE, "");
+#if HAVE_GETTEXT
(void) setlocale(LC_MESSAGES, "");
#ifdef TZ_DOMAINDIR
(void) bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR);
-#endif /* defined(TEXTDOMAINDIR) */
+#endif /* defined TEXTDOMAINDIR */
(void) textdomain(TZ_DOMAIN);
-#endif /* HAVE_GETTEXT - 0 */
+#endif /* HAVE_GETTEXT */
progname = argv[0];
for (i = 1; i < argc; ++i)
if (strcmp(argv[i], "--version") == 0) {
@@ -324,7 +321,7 @@ struct tm * oldp;
return -delta(oldp, newp);
result = 0;
for (tmy = oldp->tm_year; tmy < newp->tm_year; ++tmy)
- result += DAYSPERNYEAR + isleap(tmy + TM_YEAR_BASE);
+ result += DAYSPERNYEAR + isleap(tmy + (long) TM_YEAR_BASE);
result += newp->tm_yday - oldp->tm_yday;
result *= HOURSPERDAY;
result += newp->tm_hour - oldp->tm_hour;
@@ -344,10 +341,12 @@ int v;
struct tm * tmp;
(void) printf("%-*s ", (int) longest, zone);
- if (v)
- (void) printf("%.24s UTC = ", asctime(gmtime(&t)));
+ if (v) {
+ dumptime(gmtime(&t));
+ (void) printf(" UTC = ");
+ }
tmp = localtime(&t);
- (void) printf("%.24s", asctime(tmp));
+ dumptime(tmp);
if (*abbr(tmp) != '\0')
(void) printf(" %s", abbr(tmp));
if (v) {
@@ -371,3 +370,37 @@ struct tm * tmp;
result = tzname[tmp->tm_isdst];
return (result == NULL) ? &nada : result;
}
+
+static void
+dumptime(timeptr)
+register const struct tm * timeptr;
+{
+ static const char wday_name[][3] = {
+ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
+ };
+ static const char mon_name[][3] = {
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
+ };
+ register const char * wn;
+ register const char * mn;
+
+ /*
+ ** The packaged versions of localtime and gmtime never put out-of-range
+ ** values in tm_wday or tm_mon, but since this code might be compiled
+ ** with other (perhaps experimental) versions, paranoia is in order.
+ */
+ if (timeptr->tm_wday < 0 || timeptr->tm_wday >=
+ (int) (sizeof wday_name / sizeof wday_name[0]))
+ wn = "???";
+ else wn = wday_name[timeptr->tm_wday];
+ if (timeptr->tm_mon < 0 || timeptr->tm_mon >=
+ (int) (sizeof mon_name / sizeof mon_name[0]))
+ mn = "???";
+ else mn = mon_name[timeptr->tm_mon];
+ (void) printf("%.3s %.3s%3d %.2d:%.2d:%.2d %ld",
+ wn, mn,
+ timeptr->tm_mday, timeptr->tm_hour,
+ timeptr->tm_min, timeptr->tm_sec,
+ timeptr->tm_year + (long) TM_YEAR_BASE);
+}