about summary refs log tree commit diff
path: root/time
diff options
context:
space:
mode:
Diffstat (limited to 'time')
-rw-r--r--time/antarctica4
-rw-r--r--time/asia115
-rw-r--r--time/ialloc.c9
-rw-r--r--time/private.h17
-rw-r--r--time/scheck.c5
-rw-r--r--time/tzfile.c2
-rw-r--r--time/tzselect.ksh13
-rw-r--r--time/zdump.c32
-rw-r--r--time/zic.c32
-rw-r--r--time/zone.tab2
10 files changed, 139 insertions, 92 deletions
diff --git a/time/antarctica b/time/antarctica
index 1cff7552d1..c06231e454 100644
--- a/time/antarctica
+++ b/time/antarctica
@@ -1,4 +1,4 @@
-# @(#)antarctica	7.6
+# @(#)antarctica	7.7
 
 # From Paul Eggert (1997-01-20):
 # To keep things manageable, we list only locations occupied year-round;
@@ -79,7 +79,7 @@ Zone Indian/Kerguelen	0	-	___	1950	# Port-aux-Francais
 			5:00	-	TFT	# ISO code TF Time
 #
 # year-round base in the main continent
-# Dumont-d'Urville, Terre Adelie (Adelie Land), -6040+14001, since 1956-11
+# Dumont-d'Urville, Terre Adelie (Adelie Land), -6640+14001, since 1956-11
 #
 # Another base at Port-Martin, 50km east, began operation in 1947.
 # It was destroyed by fire on 1952-01-14.
diff --git a/time/asia b/time/asia
index 07cdb113c4..0a3c4fed00 100644
--- a/time/asia
+++ b/time/asia
@@ -1,4 +1,4 @@
-# @(#)asia	7.27
+# @(#)asia	7.28
 
 # 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
@@ -506,8 +506,10 @@ Rule	Zion	1987	only	-	Sep	13	0:00	0	S
 Rule	Zion	1988	only	-	Apr	 9	0:00	1:00	D
 Rule	Zion	1988	only	-	Sep	 3	0:00	0	S
 
-# From Ephraim Silverberg (1996-01-02):
-#
+# From Ephraim Silverberg (ephraim@cs.huji.ac.il), 1997-03-04:
+
+# Zone Information Compiler (ZIC) File for the State of Israel (1989-2009)
+
 # According to the Office of the Secretary General of the Ministry of
 # Interior, there is NO set rule for Daylight-Savings/Standard time changes.
 # Each year they decide anew what havoc to wreak on the country.  However,
@@ -516,55 +518,82 @@ Rule	Zion	1988	only	-	Sep	 3	0:00	0	S
 # government, the phase of the moon and the direction of the wind.  Hence,
 # changes may need to be made on a semi-annual basis.  One thing is entrenched
 # in law, however: that there must be at least 150 days of daylight savings
-# time annually.  Ever since 1993, the change to daylight savings time has
-# been from midnight Thursday night to 1 a.m. Friday morning and the change
-# back to standard time on Saturday night from midnight daylight savings time
+# time annually.  Ever since 1993, the change to daylight savings time is
+# on a Thursday night from midnight IST to 1 a.m IDT.  The change back to
+# standard time is on a Saturday night from midnight daylight savings time
 # to 11 p.m. standard time.  1996 is an exception to this rule where the
-# change back to standard time takes place on Sunday night instead of Saturday
+# change back to standard time took place on Sunday night instead of Saturday
 # night to avoid conflicts with the Jewish New Year.
 
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Zion	1989	only	-	Apr	30	0:00	1:00	D
-Rule	Zion	1989	only	-	Sep	 3	0:00	0	S
-Rule	Zion	1990	only	-	Mar	25	0:00	1:00	D
-Rule	Zion	1990	only	-	Aug	26	0:00	0	S
-Rule	Zion	1991	only	-	Mar	24	0:00	1:00	D
-Rule	Zion	1991	only	-	Sep	 1	0:00	0	S
-Rule	Zion	1992	only	-	Mar	29	0:00	1:00	D
-Rule	Zion	1992	only	-	Sep	 6	0:00	0	S
-Rule	Zion	1993	only	-	Apr	 2	0:00	1:00	D
-Rule	Zion	1993	only	-	Sep	 5	0:00	0	S
+# Rule  NAME    FROM    TO      TYPE    IN      ON      AT      SAVE    LETTER/S
+Rule    Zion    1989    only    -       Apr     30      0:00    1:00    D
+Rule    Zion    1989    only    -       Sep      3      0:00    0:00    S
+Rule    Zion    1990    only    -       Mar     25      0:00    1:00    D
+Rule    Zion    1990    only    -       Aug     26      0:00    0:00    S
+Rule    Zion    1991    only    -       Mar     24      0:00    1:00    D
+Rule    Zion    1991    only    -       Sep      1      0:00    0:00    S
+Rule    Zion    1992    only    -       Mar     29      0:00    1:00    D
+Rule    Zion    1992    only    -       Sep      6      0:00    0:00    S
+Rule    Zion    1993    only    -       Apr      2      0:00    1:00    D
+Rule    Zion    1993    only    -       Sep      5      0:00    0:00    S
 
 # The dates for 1994-1995 were obtained from Office of the Spokeswoman for the
 # Ministry of Interior, Jerusalem, Israel.  The spokeswoman can be reached by
-# calling the switchboard at 972-2-701411 and asking for the spokeswoman.
+# calling the office directly at 972-2-6701447 or 972-2-6701448.
 
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Zion	1994	only	-	Apr	 1	0:00	1:00	D
-Rule	Zion	1994	only	-	Aug	28	0:00	0	S
-Rule	Zion	1995	only	-	Mar	31	0:00	1:00	D
-Rule	Zion	1995	only	-	Sep	 3	0:00	0	S
-
-# The dates for 1996-1998 were also obtained from Office of the Spokeswoman
-# for the Ministry of Interior, Jerusalem, Israel.  The official announcement
-# can be viewed (in Hebrew) at the following URL:
+# Rule  NAME    FROM    TO      TYPE    IN      ON      AT      SAVE    LETTER/S
+Rule    Zion    1994    only    -       Apr      1      0:00    1:00    D
+Rule    Zion    1994    only    -       Aug     28      0:00    0:00    S
+Rule    Zion    1995    only    -       Mar     31      0:00    1:00    D
+Rule    Zion    1995    only    -       Sep      3      0:00    0:00    S
+
+# The dates for 1996 were determined by the Minister of Interior of the
+# time, Haim Ramon.  The official announcement regarding 1996-1998
+# (with the dates for 1997 no longer being relevant) can be viewed at:
 #
-#   ftp://ftp.huji.ac.il/pub/misc/timezones/announcements/1996-1998.ps.gz
+#   ftp://ftp.huji.ac.il/pub/tz/announcements/1996-1998.ramon.ps.gz
 #
-# Caveat emptor: The dates for the years 1996-1998 were originally announced
-# on 1995-08-31, by the previous Minister of Interior.  The new Minister
-# of Interior changed the dates on 1996-01-01, to take into account the
-# desires of certain portions of Israeli society (the next election is in the
-# Fall of 1996).  After this (1996) year's Daylight Savings Time is over, the
-# new minister has announced that a study will be conducted as to the wishes of
-# the populace regarding the length of Daylight Savings Time and the Interior
-# Committee will meet to review the results of the study and make any necessary
-# changes to the 1997-1998 dates.  Never a dull moment in the State of Israel.
-
-# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Zion	1996	1998	-	Mar	Fri>=14	0:00	1:00	D
-Rule	Zion	1996	only	-	Sep	16	0:00	0	S
-Rule	Zion	1997	1998	-	Oct	Sun>=14	0:00	0	S
+# The dates for 1997 were altered by his successor, Rabbi Eli Suissa.
+# No changes have been made regarding 1998 as of yet.
+#
+# The official announcement for the year 1997 can be viewed at:
+#
+#   ftp://ftp.huji.ac.il/pub/tz/announcements/1997.ps.gz
+
+# Rule  NAME    FROM    TO      TYPE    IN      ON      AT      SAVE    LETTER/S
+Rule    Zion    1996    only    -       Mar     15      0:00    1:00    D
+Rule    Zion    1996    only    -       Sep     16      0:00    0:00    S
+Rule    Zion    1997    only    -       Mar     21      0:00    1:00    D
+Rule    Zion    1997    only    -       Sep     14      0:00    0:00    S
+Rule    Zion    1998    only    -       Mar     20      0:00    1:00    D
+Rule    Zion    1998    only    -       Oct     18      0:00    0:00    S
+
+# These rules are probably wrong, but they are close approximations (usually
+# within a few weeks):
+
+# Rule  NAME    FROM    TO      TYPE    IN      ON      AT      SAVE    LETTER/S
+Rule    Zion    1999    only    -       Apr     11      0:00    1:00    D
+Rule    Zion    1999    only    -       Sep      5      0:00    0:00    S
+Rule    Zion    2000    only    -       Apr     30      0:00    1:00    D
+Rule    Zion    2000    only    -       Sep     24      0:00    0:00    S
+Rule    Zion    2001    only    -       Apr     15      0:00    1:00    D
+Rule    Zion    2001    only    -       Sep      9      0:00    0:00    S
+Rule    Zion    2002    only    -       Apr      7      0:00    1:00    D
+Rule    Zion    2002    only    -       Sep      1      0:00    0:00    S
+Rule    Zion    2003    only    -       Apr     27      0:00    1:00    D
+Rule    Zion    2003    only    -       Sep     21      0:00    0:00    S
+Rule    Zion    2004    only    -       Apr     18      0:00    1:00    D
+Rule    Zion    2004    only    -       Sep     12      0:00    0:00    S
+Rule    Zion    2005    only    -       May      1      0:00    1:00    D
+Rule    Zion    2005    only    -       Sep     25      0:00    0:00    S
+Rule    Zion    2006    only    -       Apr     23      0:00    1:00    D
+Rule    Zion    2006    only    -       Sep     17      0:00    0:00    S
+Rule    Zion    2007    only    -       Apr     15      0:00    1:00    D
+Rule    Zion    2007    only    -       Sep      9      0:00    0:00    S
+Rule    Zion    2008    only    -       Apr     27      0:00    1:00    D
+Rule    Zion    2008    only    -       Sep     21      0:00    0:00    S
+Rule    Zion    2009    only    -       Apr     19      0:00    1:00    D
+Rule    Zion    2009    only    -       Sep     13      0:00    0:00    S
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Jerusalem	2:20:56 -	LMT	1880
diff --git a/time/ialloc.c b/time/ialloc.c
index 5631947d07..8a0c701578 100644
--- a/time/ialloc.c
+++ b/time/ialloc.c
@@ -1,6 +1,6 @@
 #ifndef lint
 #ifndef NOID
-static char	elsieid[] = "@(#)ialloc.c	8.28";
+static char	elsieid[] = "@(#)ialloc.c	8.29";
 #endif /* !defined NOID */
 #endif /* !defined lint */
 
@@ -10,13 +10,6 @@ static char	elsieid[] = "@(#)ialloc.c	8.28";
 
 #define nonzero(n)	(((n) == 0) ? 1 : (n))
 
-char *	icalloc P((int nelem, int elsize));
-char *	icatalloc P((char * old, const char * new));
-char *	icpyalloc P((const char * string));
-char *	imalloc P((int n));
-void *	irealloc P((void * pointer, int size));
-void	ifree P((char * pointer));
-
 char *
 imalloc(n)
 const int	n;
diff --git a/time/private.h b/time/private.h
index f81bf4867b..5a5b516d0f 100644
--- a/time/private.h
+++ b/time/private.h
@@ -4,7 +4,7 @@
 
 /*
 ** This file is in the public domain, so clarified as of
-** June 5, 1996 by Arthur David Olson (arthur_david_olson@nih.gov).
+** 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
 */
 
 /*
@@ -21,7 +21,7 @@
 
 #ifndef lint
 #ifndef NOID
-static char	privatehid[] = "@(#)private.h	7.43";
+static char	privatehid[] = "@(#)private.h	7.45";
 #endif /* !defined NOID */
 #endif /* !defined lint */
 
@@ -173,6 +173,19 @@ extern int errno;
 #endif /* !defined errno */
 
 /*
+** Private function declarations.
+*/
+char *	icalloc P((int nelem, int elsize));
+char *	icatalloc P((char * old, const char * new));
+char *	icpyalloc P((const char * string));
+char *	imalloc P((int n));
+void *	irealloc P((void * pointer, int size));
+void	icfree P((char * pointer));
+void	ifree P((char * pointer));
+char *  scheck P((const char *string, char *format));
+
+
+/*
 ** Finally, some convenience items.
 */
 
diff --git a/time/scheck.c b/time/scheck.c
index 64f25076ed..b51f58d042 100644
--- a/time/scheck.c
+++ b/time/scheck.c
@@ -1,6 +1,6 @@
 #ifndef lint
 #ifndef NOID
-static char	elsieid[] = "@(#)scheck.c	8.13";
+static char	elsieid[] = "@(#)scheck.c	8.14";
 #endif /* !defined lint */
 #endif /* !defined NOID */
 
@@ -8,9 +8,6 @@ static char	elsieid[] = "@(#)scheck.c	8.13";
 
 #include "private.h"
 
-extern char *	imalloc P((int n));
-extern void	ifree P((char * p));
-
 char *
 scheck(string, format)
 const char * const	string;
diff --git a/time/tzfile.c b/time/tzfile.c
index 94b8a3c8fe..44b33cb02c 100644
--- a/time/tzfile.c
+++ b/time/tzfile.c
@@ -120,7 +120,7 @@ __tzfile_read (const char *file)
 	 and which is not the system wide default TZDEFAULT.  */
       if (__libc_enable_secure
 	  && ((*file == '/'
-	       && memcmp (file, TZDEFAULT, sizeof (TZDEFAULT) - 1)
+	       && memcmp (file, TZDEFAULT, sizeof TZDEFAULT)
 	       && memcmp (file, default_tzdir, sizeof (default_tzdir) - 1))
 	      || strstr (file, "../") != NULL))
 	/* This test is certainly a bit too restrictive but it should
diff --git a/time/tzselect.ksh b/time/tzselect.ksh
index 33bdbc7431..031cda1de6 100644
--- a/time/tzselect.ksh
+++ b/time/tzselect.ksh
@@ -11,23 +11,20 @@
 # you can use either of the following free programs instead:
 #
 #	Bourne-Again shell (bash)
-#	<URL:ftp://prep.ai.mit.edu:/pub/gnu/bash-2.0.tar.gz>
-#	(or any later version)
+#	<URL:ftp://ftp.gnu.ai.mit.edu/pub/gnu/>
 #
 #	Public domain ksh
-#	<URL:ftp://ftp.cs.mun.ca:/pub/pdksh/pdksh.tar.gz>
+#	<URL:ftp://ftp.cs.mun.ca/pub/pdksh/pdksh.tar.gz>
 #
 # This script also uses several features of modern awk programs.
 # If your host lacks awk, or has an old awk that does not conform to Posix.2,
 # you can use either of the following free programs instead:
 #
 #	GNU awk (gawk)
-#	<URL:ftp://prep.ai.mit.edu:/pub/gnu/gawk-3.0.2.tar.gz>
-#	(or any later version)
+#	<URL:ftp://ftp.gnu.ai.mit.edu/pub/gnu/>
 #
 #	mawk
-#	<URL:ftp://oxy.edu/public/mawk1.2.2.tar.gz>
-#	(or any later version)
+#	<URL:ftp://ftp.whidbey.net/pub/brennan/>
 
 
 # Specify default values for environment variables if they are unset.
@@ -57,7 +54,7 @@ newline='
 IFS=$newline
 
 
-# Work around a bash bug, where $PS3 is sent to stdout.
+# Work around a bug in bash 1.14.7 and earlier, where $PS3 is sent to stdout.
 case $(echo 1 | (select x in x; do break; done) 2>/dev/null) in
 ?*) PS3=
 esac
diff --git a/time/zdump.c b/time/zdump.c
index e5ed82f104..01c79ca7fb 100644
--- a/time/zdump.c
+++ b/time/zdump.c
@@ -1,6 +1,6 @@
 #ifndef lint
 #ifndef NOID
-static char	elsieid[] = "@(#)zdump.c	7.25";
+static char	elsieid[] = "@(#)zdump.c	7.26";
 #endif /* !defined NOID */
 #endif /* !defined lint */
 
@@ -111,19 +111,28 @@ static char	elsieid[] = "@(#)zdump.c	7.25";
 #define TZ_DOMAIN "tz"
 #endif /* !defined TZ_DOMAIN */
 
+#ifndef P
+#ifdef __STDC__
+#define P(x)	x
+#endif /* defined __STDC__ */
+#ifndef __STDC__
+#define P(x)	()
+#endif /* !defined __STDC__ */
+#endif /* !defined P */
+
 extern char **	environ;
-extern int	getopt();
+extern int	getopt P((int argc, char * const argv[],
+			  const char * options));
 extern char *	optarg;
 extern int	optind;
-extern time_t	time();
 extern char *	tzname[2];
 
-static char *	abbr();
-static long	delta();
-static time_t	hunt();
-static int	longest;
+static char *	abbr P((struct tm * tmp));
+static long	delta P((struct tm * newp, struct tm * oldp));
+static time_t	hunt P((char * name, time_t lot, time_t	hit));
+static size_t	longest;
 static char *	progname;
-static void	show();
+static void	show P((char * zone, time_t t, int v));
 
 int
 main(argc, argv)
@@ -191,8 +200,7 @@ _("%s: usage is %s [ -v ] [ -c cutoff ] zonename ...\n"),
 		fakeenv = (char **) malloc((size_t) ((i + 2) *
 			sizeof *fakeenv));
 		if (fakeenv == NULL ||
-			(fakeenv[0] = (char *) malloc((size_t) (longest +
-				4))) == NULL) {
+			(fakeenv[0] = (char *) malloc(longest + 4)) == NULL) {
 					(void) perror(progname);
 					(void) exit(EXIT_FAILURE);
 		}
@@ -326,8 +334,6 @@ struct tm *	oldp;
 	return result;
 }
 
-extern struct tm *	localtime();
-
 static void
 show(zone, t, v)
 char *	zone;
@@ -336,7 +342,7 @@ int	v;
 {
 	struct tm *	tmp;
 
-	(void) printf("%-*s  ", longest, zone);
+	(void) printf("%-*s  ", (int) longest, zone);
 	if (v)
 		(void) printf("%.24s GMT = ", asctime(gmtime(&t)));
 	tmp = localtime(&t);
diff --git a/time/zic.c b/time/zic.c
index c4c9a3ae25..b9518c4649 100644
--- a/time/zic.c
+++ b/time/zic.c
@@ -1,6 +1,6 @@
 #ifndef lint
 #ifndef NOID
-static char	elsieid[] = "@(#)zic.c	7.82";
+static char	elsieid[] = "@(#)zic.c	7.83";
 #endif /* !defined NOID */
 #endif /* !defined lint */
 
@@ -79,15 +79,9 @@ struct zone {
 
 extern int	getopt P((int argc, char * const argv[],
 			const char * options));
-extern char *	icatalloc P((char * old, const char * new));
-extern char *	icpyalloc P((const char * string));
-extern void	ifree P((char * p));
-extern char *	imalloc P((int n));
-extern void *	irealloc P((void * old, int n));
 extern int	link P((const char * fromname, const char * toname));
 extern char *	optarg;
 extern int	optind;
-extern char *	scheck P((const char * string, const char * format));
 
 static void	addtt P((time_t starttime, int type));
 static int	addtype P((long gmtoff, const char * abbr, int isdst,
@@ -1289,6 +1283,8 @@ const char * const		timep;
 		}
 		rp->r_yrtype = ecpyalloc(typep);
 	}
+	if (rp->r_loyear < min_year && rp->r_loyear > 0)
+		min_year = rp->r_loyear;
 	/*
 	** Day work.
 	** Accept things such as:
@@ -1397,8 +1393,10 @@ const char * const	name;
 
 		toi = 0;
 		fromi = 0;
+		while (fromi < timecnt && attypes[fromi].at < min_time)
+			++fromi;
 		if (isdsts[0] == 0)
-			while (attypes[fromi].type == 0)
+			while (fromi < timecnt && attypes[fromi].type == 0)
 				++fromi;	/* handled by default rule */
 		for ( ; fromi < timecnt; ++fromi) {
 			if (toi != 0
@@ -1723,8 +1721,22 @@ error(_("can't determine time zone abbreviation to use just after until time"));
 static void
 addtt(starttime, type)
 const time_t	starttime;
-const int	type;
+int		type;
 {
+	if (starttime <= min_time ||
+		(timecnt == 1 && attypes[0].at < min_time)) {
+		gmtoffs[0] = gmtoffs[type];
+		isdsts[0] = isdsts[type];
+		ttisstds[0] = ttisstds[type];
+		ttisgmts[0] = ttisgmts[type];
+		if (abbrinds[type] != 0)
+			(void) strcpy(chars, &chars[abbrinds[type]]);
+		abbrinds[0] = 0;
+		charcnt = strlen(chars) + 1;
+		typecnt = 1;
+		timecnt = 0;
+		type = 0;
+	}
 	if (timecnt >= TZ_MAX_TIMES) {
 		error(_("too many transitions?!"));
 		(void) exit(EXIT_FAILURE);
@@ -2130,7 +2142,7 @@ char * const	argname;
 			** created by some other multiprocessor, so we get
 			** to do extra checking.
 			*/
-			if (mkdir(name, 0755) != 0) {
+			if (mkdir(name, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) != 0) {
 				const char *e = strerror(errno);
 
 				if (errno != EEXIST || !itsdir(name)) {
diff --git a/time/zone.tab b/time/zone.tab
index 6d91b4ea6c..074749916a 100644
--- a/time/zone.tab
+++ b/time/zone.tab
@@ -34,7 +34,7 @@ AQ	-9000+00000	Antarctica/South_Pole	Amundsen-Scott Station, South Pole
 AQ	-6448-06406	Antarctica/Palmer	Palmer Station, Anvers Island
 AQ	-6736+06253	Antarctica/Mawson	Mawson Station, Holme Bay
 AQ	-6617+11031	Antarctica/Casey	Casey Station, Bailey Peninsula
-AQ	-6040+14001	Antarctica/DumontDUrville	Dumont-d'Urville Base, Terre Adelie
+AQ	-6640+14001	Antarctica/DumontDUrville	Dumont-d'Urville Base, Terre Adelie
 AR	-3436-05827	America/Buenos_Aires	E Argentina (BA, DF, SC, TF)
 AR	-3257-06040	America/Rosario	NE Argentina (SF, ER, CN, MN, CC, FM, LP, CH)
 AR	-3124-06411	America/Cordoba	W Argentina (CB, SA, TM, LR, SJ, SL, NQ, RN)