CVE-1999-0199: Unchecked Return Value (CWE-252)
value: manual/search.texi in the GNU C Library (aka glibc) before 2.2 lacks a statement about the unspecified tdelete return value upon deletion of a tree's root, which might allow attackers to access a dangling pointer in an application whose developer was unaware of a documentation update from 1999.
CWE description: The product does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
CVSS v3 base score: 9.8
Published: 2020-10-06T13:15Z
Repository: https://github.com/bminor/glibc
Language: Other
Files changed: ChangeLog, elf/dl-load.c, manual/search.texi, misc/syslog.c, posix/Makefile, posix/regex.c, posix/tst-getlogin.c, sysdeps/unix/getlogin_r.c, sysdeps/unix/sysv/linux/bits/resource.h, timezone/africa, timezone/asia, timezone/australasia, timezone/backward, timezone/checktab.awk, timezone/europe, timezone/iso3166.tab, timezone/northamerica, timezone/southamerica, timezone/zone.tab
Commit date: 1999-11-10 02:42:49 +0000
Commit message: Update.

1999-11-09  Ulrich Drepper  <drepper@cygnus.com>

	* elf/dl-load.c (_dl_dst_count): Allow $ORIGIN to point to
	directory with the reference since this is as secure as using the
	object with the dependency.
	(_dl_dst_substitute): Likewise.

	* elf/dl-load.c (_dl_dst_count): Change strings in first two
	strncmp calls to allow reuse.
	(_dl_dst_substitute): Likewise.

1999-11-01  Arnold D. Robbins  <arnold@skeeve.com>

	* posix/regex.c (init_syntax_once): move below definition of
	ISALNUM etc., then use ISALNUM to init the table, so that
	the word ops will work if i18n'ed.
	(SYNTAX): And subscript with 0xFF for 8bit character sets.

1999-11-09  Andreas Jaeger  <aj@suse.de>

	* sysdeps/unix/getlogin_r.c (getlogin_r): Sync with getlogin
	implementation for ttyname_r call; fix inverted condition; return
	ut_user.  Closes PR libc/1438.

1999-11-09  Ulrich Drepper  <drepper@cygnus.com>

	* timezone/checktab.awk: Update from tzcode1999h.
	* timezone/africa: Update from tzdata1999i.
	* timezone/asia: Likewise.
	* timezone/australasia: Likewise.
	* timezone/backward: Likewise.
	* timezone/europe: Likewise.
	* timezone/northamerica: Likewise.
	* timezone/southamerica: Likewise.
	* timezone/iso3166.tab: Likewise.
	* timezone/zone.tab: Likewise.

	* sysdeps/unix/sysv/linux/bits/resource.h: Define values also as
	macros.  Patch by brg@csua.berkeley.edu [PR libc/1439].

1999-11-09  Andreas Jaeger  <aj@suse.de>

	* posix/Makefile (tests): Added tst-getlogin.

	* posix/tst-getlogin.c: New file, contains simple tests for
	getlogin and getlogin_r.

1999-11-09  Andreas Schwab  <schwab@suse.de>

	* misc/syslog.c: For LOG_PERROR only append a newline if
	necessary.

Diff: diff --git a/ChangeLog b/ChangeLog
index cd3953c9f..f3d9cad5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,57 @@
+1999-11-09  Ulrich Drepper  <drepper@cygnus.com>
+
+	* elf/dl-load.c (_dl_dst_count): Allow $ORIGIN to point to
+	directory with the reference since this is as secure as using the
+	object with the dependency.
+	(_dl_dst_substitute): Likewise.
+
+	* elf/dl-load.c (_dl_dst_count): Change strings in first two
+	strncmp calls to allow reuse.
+	(_dl_dst_substitute): Likewise.
+
+1999-11-01  Arnold D. Robbins  <arnold@skeeve.com>
+
+	* posix/regex.c (init_syntax_once): move below definition of
+	ISALNUM etc., then use ISALNUM to init the table, so that
+	the word ops will work if i18n'ed.
+	(SYNTAX): And subscript with 0xFF for 8bit character sets.
+
+1999-11-09  Andreas Jaeger  <aj@suse.de>
+
+	* sysdeps/unix/getlogin_r.c (getlogin_r): Sync with getlogin
+	implementation for ttyname_r call; fix inverted condition; return
+	ut_user.  Closes PR libc/1438.
+
+1999-11-09  Ulrich Drepper  <drepper@cygnus.com>
+
+	* timezone/checktab.awk: Update from tzcode1999h.
+	* timezone/africa: Update from tzdata1999i.
+	* timezone/asia: Likewise.
+	* timezone/australasia: Likewise.
+	* timezone/backward: Likewise.
+	* timezone/europe: Likewise.
+	* timezone/northamerica: Likewise.
+	* timezone/southamerica: Likewise.
+	* timezone/iso3166.tab: Likewise.
+	* timezone/zone.tab: Likewise.
+
+	* sysdeps/unix/sysv/linux/bits/resource.h: Define values also as
+	macros.  Patch by brg@csua.berkeley.edu [PR libc/1439].
+
+1999-11-09  Andreas Jaeger  <aj@suse.de>
+
+	* posix/Makefile (tests): Added tst-getlogin.
+
+	* posix/tst-getlogin.c: New file, contains simple tests for
+	getlogin and getlogin_r.
+
+1999-11-09  Andreas Schwab  <schwab@suse.de>
+
+	* misc/syslog.c: For LOG_PERROR only append a newline if
+	necessary.
+
 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
 
 	* elf/elf.h: Add STT_REGISTER, STT_HP_OPAQUE, and STT_ST_STUB
 	definitions.
 
diff --git a/elf/dl-load.c b/elf/dl-load.c
index eb3c41577..2d5478621 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -147,25 +147,35 @@ local_strdup (const char *s)
 
 
 size_t
 _dl_dst_count (const char *name, int is_path)
 {
+  const char *const start = name;
   size_t cnt = 0;
 
   do
     {
       size_t len = 1;
 
-      /* $ORIGIN is not expanded for SUID/GUID programs.  */
-      if ((((!__libc_enable_secure
-	     && strncmp (&name[1], "ORIGIN", 6) == 0 && (len = 7) != 0)
-	    || (strncmp (&name[1], "PLATFORM", 8) == 0 && (len = 9) != 0))
+      /* $ORIGIN is not expanded for SUID/GUID programs.
+
+	 Note that it is no bug that the strings in the first two `strncmp'
+	 calls are longer than the sequence which is actually tested.  */
+      if ((((strncmp (&name[1], "ORIGIN}", 6) == 0
+	     && (!__libc_enable_secure
+		 || ((name[7] == '\0' || (is_path && name[7] == ':'))
+		     && (name == start || (is_path && name[-1] == ':'))))
+	     && (len = 7) != 0)
+	    || (strncmp (&name[1], "PLATFORM}", 8) == 0 && (len = 9) != 0))
 	   && (name[len] == '\0' || name[len] == '/'
 	       || (is_path && name[len] == ':')))
 	  || (name[1] == '{'
-	      && ((!__libc_enable_secure
-		   && strncmp (&name[2], "ORIGIN}", 7) == 0 && (len = 9) != 0)
+	      && ((strncmp (&name[2], "ORIGIN}", 7) == 0
+		   && (!__libc_enable_secure
+		       || ((name[9] == '\0' || (is_path && name[9] == ':'))
+			   && (name == start || (is_path && name[-1] == ':'))))
+		   && (len = 9) != 0)
 		  || (strncmp (&name[2], "PLATFORM}", 9) == 0
 		      && (len = 11) != 0))))
 	++cnt;
 
       name = strchr (name + len, '$');
@@ -178,10 +188,11 @@ _dl_dst_count (const char *name, int is_path)
 
 char *
 _dl_dst_substitute (struct link_map *l, const char *name, char *result,
 		    int is_path)
 {
+  const char *const start = name;
   char *last_elem, *wp;
 
   /* Now fill the result path.  While copying over the string we keep
      track of the start of the last path element.  When we come accross
      a DST we copy over the value or (if the value is not available)
@@ -193,21 +204,28 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
       if (*name == '$')
 	{
 	  const char *repl;
 	  size_t len;
 
-	  if ((((strncmp (&name[1], "ORIGIN", 6) == 0 && (len = 7) != 0)
-		|| (strncmp (&name[1], "PLATFORM", 8) == 0 && (len = 9) != 0))
+      /* Note that it is no bug that the strings in the first two `strncmp'
+	 calls are longer than the sequence which is actually tested.  */
+	  if ((((strncmp (&name[1], "ORIGIN}", 6) == 0 && (len = 7) != 0)
+		|| (strncmp (&name[1], "PLATFORM}", 8) == 0 && (len = 9) != 0))
 	       && (name[len] == '\0' || name[len] == '/'
 		   || (is_path && name[len] == ':')))
 	      || (name[1] == '{'
 		  && ((strncmp (&name[2], "ORIGIN}", 7) == 0 && (len = 9) != 0)
 		      || (strncmp (&name[2], "PLATFORM}", 9) == 0
 			  && (len = 11) != 0))))
 	    {
 	      repl = ((len == 7 || name[2] == 'O')
-		      ? (__libc_enable_secure ? NULL : l->l_origin)
+		      ? (__libc_enable_secure
+			 && ((name[len] != '\0'
+			      && (!is_path || name[len] != ':'))
+			     || (name != start
+				 && (!is_path || name[-1] != ':')))
+			 ? NULL : l->l_origin)
 		      : _dl_platform);
 
 	      if (repl != NULL && repl != (const char *) -1)
 		{
 		  wp = __stpcpy (wp, repl);
@@ -257,11 +275,11 @@ expand_dynamic_string_token (struct link_map *l, const char *s)
      but rather for code size.  */
   size_t cnt;
   size_t total;
   char *result;
 
-  /* Determine the nubmer of DST elements.  */
+  /* Determine the number of DST elements.  */
   cnt = DL_DST_COUNT (s, 1);
 
   /* If we do not have to replace anything simply copy the string.  */
   if (cnt == 0)
     return local_strdup (s);
diff --git a/manual/search.texi b/manual/search.texi
index f561ef9e3..ec82e1cc2 100644
--- a/manual/search.texi
+++ b/manual/search.texi
@@ -473,13 +473,15 @@ elements.
 @comment SVID
 @deftypefun {void *} tdelete (const void *@var{key}, void **@var{rootp}, comparison_fn_t @var{compar})
 To remove a specific element matching @var{key} from the tree
 @code{tdelete} can be used.  It locates the matching element using the
 same method as @code{tfind}.  The corresponding element is then removed
-and the data if this tree node is returned by the function.  If there is
-no matching entry in the tree nothing can be deleted and the function
-returns @code{NULL}.
+and a pointer to the parent of the deleted node is returned by the
+function.  If there is no matching entry in the tree nothing can be
+deleted and the function returns @code{NULL}.  If the root of the tree
+is deleted @code{tdelete} returns some unspecified value not equal to
+@code{NULL}.
 @end deftypefun
 
 @comment search.h
 @comment GNU
 @deftypefun void tdestroy (void *@var{vroot}, __free_fn_t @var{freefct})
diff --git a/misc/syslog.c b/misc/syslog.c
index ee832fefb..9690bf1da 100644
--- a/misc/syslog.c
+++ b/misc/syslog.c
@@ -175,14 +175,18 @@ vsyslog(pri, fmt, ap)
 		struct iovec iov[2];
 		register struct iovec *v = iov;
 
 		v->iov_base = buf + msgoff;
 		v->iov_len = bufsize - msgoff;
-		++v;
-		v->iov_base = (char *) "\n";
-		v->iov_len = 1;
-		(void)__writev(STDERR_FILENO, iov, 2);
+		/* Append a newline if necessary.  */
+		if (buf[bufsize - 1] != '\n')
+		  {
+		    ++v;
+		    v->iov_base = (char *) "\n";
+		    v->iov_len = 1;
+		  }
+		(void)__writev(STDERR_FILENO, iov, v - iov + 1);
 	}
 
 	/* Prepare for multiple users.  We have to take care: open and
 	   write are cancellation points.  */
 	__libc_cleanup_region_start ((void (*) (void *)) cancel_handler,
diff --git a/posix/Makefile b/posix/Makefile
index f8e72b65a..7861bdf5f 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -55,11 +55,11 @@ routines :=								      \
 
 include ../Makeconfig
 
 aux		:= init-posix environ
 tests		:= tstgetopt testfnm runtests runptests	     \
-		   tst-preadwrite test-vfork regexbug1
+		   tst-preadwrite test-vfork regexbug1 tst-getlogin
 ifeq (yes,$(build-shared))
 test-srcs	:= globtest
 tests           += wordexp-test
 endif
 others		:= getconf
diff --git a/posix/regex.c b/posix/regex.c
index 16e91f151..04df21e30 100644
--- a/posix/regex.c
+++ b/posix/regex.c
@@ -162,50 +162,10 @@ char *realloc ();
 #  define SWITCH_ENUM_CAST(x) ((int)(x))
 # else
 #  define SWITCH_ENUM_CAST(x) (x)
 # endif
 
-/* How many characters in the character set.  */
-# define CHAR_SET_SIZE 256
-
-# ifdef SYNTAX_TABLE
-
-extern char *re_syntax_table;
-
-# else /* not SYNTAX_TABLE */
-
-static char re_syntax_table[CHAR_SET_SIZE];
-
-static void
-init_syntax_once ()
-{
-   register int c;
-   static int done;
-
-   if (done)
-     return;
-
-   bzero (re_syntax_table, sizeof re_syntax_table);
-
-   for (c = 'a'; c <= 'z'; c++)
-     re_syntax_table[c] = Sword;
-
-   for (c = 'A'; c <= 'Z'; c++)
-     re_syntax_table[c] = Sword;
-
-   for (c = '0'; c <= '9'; c++)
-     re_syntax_table[c] = Sword;
-
-   re_syntax_table['_'] = Sword;
-
-   done = 1;
-}
-
-# endif /* not SYNTAX_TABLE */
-
-# define SYNTAX(c) re_syntax_table[c]
-
 #endif /* not emacs */
 
 /* Get the interface, including the syntax bits.  */
 #include <regex.h>
 
@@ -274,10 +234,47 @@ init_syntax_once ()
 #else  /* not __STDC__ */
 /* As in Harbison and Steele.  */
 # define SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128)
 #endif
 
+#ifndef emacs
+/* How many characters in the character set.  */
+# define CHAR_SET_SIZE 256
+
+# ifdef SYNTAX_TABLE
+
+extern char *re_syntax_table;
+
+# else /* not SYNTAX_TABLE */
+
+static char re_syntax_table[CHAR_SET_SIZE];
+
+static void
+init_syntax_once ()
+{
+   register int c;
+   static int done = 0;
+
+   if (done)
+     return;
+   bzero (re_syntax_table, sizeof re_syntax_table);
+
+   for (c = 0; c < CHAR_SET_SIZE; ++c)
+     if (ISALNUM (c))
+	re_syntax_table[c] = Sword;
+
+   re_syntax_table['_'] = Sword;
+
+   done = 1;
+}
+
+# endif /* not SYNTAX_TABLE */
+
+# define SYNTAX(c) re_syntax_table[((c) & 0xFF)]
+
+#endif /* emacs */
+
 /* Should we use malloc or alloca?  If REGEX_MALLOC is not defined, we
    use `alloca' instead of `malloc'.  This is because using malloc in
    re_search* or re_match* could cause memory leaks when C-g is used in
    Emacs; also, malloc is slower and causes storage fragmentation.  On
    the other hand, malloc is more portable, and easier to debug.
diff --git a/posix/tst-getlogin.c b/posix/tst-getlogin.c
new file mode 100644
index 000000000..75c0c5c43
--- /dev/null
+++ b/posix/tst-getlogin.c
@@ -0,0 +1,58 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#include <unistd.h>
+#include <stdio.h>
+#include <string.h>
+
+int
+main (void)
+{
+  char *login;
+  int errors = 0;
+
+  login = getlogin ();
+  if (login == NULL)
+    puts ("getlogin returned NULL, no further tests");
+  else
+    {
+      char name[1024];
+      int ret;
+
+      printf ("getlogin returned: `%s'\n", login);
+
+      ret = getlogin_r (name, sizeof (name));
+      if (ret == 0)
+	{
+	  printf ("getlogin_r returned: `%s'\n", name);
+	  if (strcmp (name, login) != 0)
+	    {
+	      puts ("Error: getlogin and getlogin_r returned different names");
+	      ++errors;
+	    }
+	}
+      else
+	{
+	  printf ("Error: getlogin_r returned: %d (%s)\n",
+		  ret, strerror (ret));
+	  ++errors;
+	}
+    }
+
+  return errors != 0;
+}
diff --git a/sysdeps/unix/getlogin_r.c b/sysdeps/unix/getlogin_r.c
index cb0545e08..04b99056b 100644
--- a/sysdeps/unix/getlogin_r.c
+++ b/sysdeps/unix/getlogin_r.c
@@ -38,24 +38,24 @@ getlogin_r (name, name_len)
   char tty_pathname[2 + 2 * NAME_MAX];
   char *real_tty_path = tty_pathname;
   int result = 0;
   struct utmp *ut, line, buffer;
 
-  {
-    int d = __open ("/dev/tty", 0);
-    if (d < 0)
-      return errno;
+  /* Get name of tty connected to fd 0.  Return if not a tty or
+     if fd 0 isn't open.  Note that a lot of documentation says that
+     getlogin() is based on the controlling terminal---what they
+     really mean is "the terminal connected to standard input".  The
+     getlogin() implementation of DEC Unix, SunOS, Solaris, HP-UX all
+     return NULL if fd 0 has been closed, so this is the compatible
+     thing to do.  Note that ttyname(open("/dev/tty")) on those
+     systems returns /dev/tty, so that is not a possible solution for
+     getlogin().  */
 
-    result = __ttyname_r (d, real_tty_path, sizeof (tty_pathname));
-    (void) __close (d);
-
-    if (result != 0)
-      {
-	__set_errno (result);
-	return result;
-      }
-  }
+  result = __ttyname_r (0, real_tty_path, sizeof (tty_pathname));
+  
+  if (result != 0)
+    return result;
 
   real_tty_path += 5;		/* Remove "/dev/".  */
 
   __setutent ();
   strncpy (line.ut_line, real_tty_path, sizeof line.ut_line);
@@ -67,20 +67,20 @@ getlogin_r (name, name_len)
       else
 	result = errno;
     }
   else
     {
-      size_t needed = strlen (ut->ut_line) + 1;
+      size_t needed = strlen (ut->ut_user) + 1;
 
-      if (needed < name_len)
+      if (needed > name_len)
 	{
 	  __set_errno (ERANGE);
 	  result = ERANGE;
 	}
       else
 	{
-	  memcpy (name, ut->ut_line, needed);
+	  memcpy (name, ut->ut_user, needed);
 	  result = 0;
 	}
     }
   __endutent ();
 
diff --git a/sysdeps/unix/sysv/linux/bits/resource.h b/sysdeps/unix/sysv/linux/bits/resource.h
index 42e0d36f1..fcff60589 100644
--- a/sysdeps/unix/sysv/linux/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/bits/resource.h
@@ -217,8 +217,11 @@ struct rusage
 /* The type of the WHICH argument to `getpriority' and `setpriority',
    indicating what flavor of entity the WHO argument specifies.  */
 enum __priority_which
 {
   PRIO_PROCESS = 0,		/* WHO is a process ID.  */
+#define PRIO_PROCESS PRIO_PROCESS
   PRIO_PGRP = 1,		/* WHO is a process group ID.  */
+#define PRIO_PGRP PRIO_PGRP
   PRIO_USER = 2			/* WHO is a user ID.  */
+#define PRIO_USER PRIO_USER
 };
diff --git a/timezone/africa b/timezone/africa
index d5d85444e..69657c017 100644
--- a/timezone/africa
+++ b/timezone/africa
@@ -1,16 +1,16 @@
-# @(#)africa	7.31
+# @(#)africa	7.32
 
 # 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
 # tz@elsie.nci.nih.gov for general use in the future).
 
 # From Paul Eggert <eggert@twinsun.com> (1999-03-22):
 #
 # A good source for time zone historical data outside the U.S. is
-# Thomas G. Shanks, The International Atlas (4th edition),
-# San Diego: ACS Publications, Inc. (1995).
+# Thomas G. Shanks, The International Atlas (5th edition),
+# San Diego: ACS Publications, Inc. (1999).
 #
 # Gwillim Law <LAW@encmail.encompass.com> writes that a good source
 # for recent time zone data is the International Air Transport
 # Association's Standard Schedules Information Manual (IATA SSIM),
 # published semiannually.  Law sent in several helpful summaries
@@ -292,12 +292,10 @@ Zone	Africa/Maseru	1:50:00 -	LMT	1903 Mar
 # from a UTC offset that was not a multiple of 15 minutes.
 # Howse reports that it was in honor of their president's birthday.
 # Shanks reports the date as May 1, whereas Howse reports Jan; go with Shanks.
 # For Liberia before 1972, Shanks reports -0:44, whereas Howse and Whitman
 # each report -0:44:30; go with the more precise figure.
-#
-# From Shanks, as corrected by Whitman:
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Monrovia	-0:43:08 -	LMT	1882
 			-0:43:08 -	MMT	1919 Mar # Monrovia Mean Time
 			-0:44:30 -	LRT	1972 May # Liberia Time
 			 0:00	-	GMT
@@ -318,22 +316,20 @@ Rule	Libya	1982	1985	-	Oct	 1	0:00	0	-
 Rule	Libya	1985	only	-	Apr	 6	0:00	1:00	S
 Rule	Libya	1986	only	-	Apr	 4	0:00	1:00	S
 Rule	Libya	1986	only	-	Oct	 3	0:00	0	-
 Rule	Libya	1987	1989	-	Apr	 1	0:00	1:00	S
 Rule	Libya	1987	1990	-	Oct	 1	0:00	0	-
-Rule	Libya	1990	only	-	May	 4	0:00	1:00	S
-Rule	Libya	1996	only	-	Mar	30	2:00s	1:00	S
-Rule	Libya	1996	only	-	Sep	30	2:00s	0	-
-Rule	Libya	1997	only	-	Apr	 4	0:00	1:00	S
-Rule	Libya	1997	only	-	Oct	 4	0:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Tripoli	0:52:44 -	LMT	1920
 			1:00	Libya	CE%sT	1959
 			2:00	-	EET	1982
-			1:00	Libya	CE%sT	1991
-			2:00	-	EET	1996 Mar 30 3:00
-			1:00	Libya	CE%sT	1997 Oct  4 0:00
+			1:00	Libya	CE%sT	1990 May  4
+# The following entries are all from Shanks;
+# the IATA SSIM data contain some obvious errors.
+			2:00	-	EET	1996 Sep 30
+			1:00	-	CET	1997 Apr  4
+			1:00	1:00	CEST	1997 Oct  4
 			2:00	-	EET
 
 # Madagascar
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Indian/Antananarivo 3:10:04 -	LMT	1911 Jul
@@ -407,12 +403,12 @@ Zone Africa/El_Aaiun	-0:52:48 -	LMT	1934 Jan
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Maputo	2:10:20 -	LMT	1903 Mar
 			2:00	-	CAT
 
 # Namibia
-# Shanks says DST transitions are at 0:00; go with IATA.
 # The 1994-04-03 transition is from Shanks.
+# Shanks reports no DST after 1998-04; go with IATA.
 # RULE	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Namibia	1994	max	-	Sep	Sun>=1	2:00	1:00	S
 Rule	Namibia	1995	max	-	Apr	Sun>=1	2:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Windhoek	1:08:24 -	LMT	1892 Feb 8
@@ -456,13 +452,10 @@ Zone	Indian/Reunion	3:41:52 -	LMT	1911 Jun	# Saint-Denis
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Africa/Kigali	2:00:16 -	LMT	1935 Jun
 			2:00	-	CAT
 
 # St Helena
-# From Paul Eggert (1997-10-05):
-# Shanks says St Helena was 1W26 (-0:05:44) from 1890 to 1951,
-# but this is most likely a typo for 5W42, the longitude of Jamestown.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Atlantic/St_Helena	-0:22:48 -	LMT	1890		# Jamestown
 			-0:22:48 -	JMT	1951	# Jamestown Mean Time
 			 0:00	-	GMT
 # The other parts of the St Helena territory are similar:
@@ -515,13 +508,10 @@ Rule	SA	1942	1943	-	Sep	Sun>=15	2:00	1:00	-
 Rule	SA	1943	1944	-	Mar	Sun>=15	2:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Johannesburg 1:52:00 -	LMT	1892 Feb 8
 			1:30	-	SAST	1903 Mar
 			2:00	SA	SAST
-# Shanks erroneously claims that most of South Africa switched to 1:00
-# on 1994-04-03 at 00:00.
-#
 # Marion and Prince Edward Is
 # scientific station since 1947
 # no information
 
 # Sudan
diff --git a/timezone/asia b/timezone/asia
index 394877c49..fd174078a 100644
--- a/timezone/asia
+++ b/timezone/asia
@@ -1,17 +1,16 @@
-# @(#)asia	7.48
+# @(#)asia	7.49
 
 # 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
 # tz@elsie.nci.nih.gov for general use in the future).
 
 # From Paul Eggert <eggert@twinsun.com> (1999-03-22):
 #
 # A good source for time zone historical data outside the U.S. is
-# Thomas G. Shanks, The International Atlas (4th edition),
-# San Diego: ACS Publications, Inc. (1995).
-# Except where otherwise noted, it is the source for the data below.
+# Thomas G. Shanks, The International Atlas (5th edition),
+# San Diego: ACS Publications, Inc. (1999).
 #
 # Gwillim Law <LAW@encmail.encompass.com> writes that a good source
 # for recent time zone data is the International Air Transport
 # Association's Standard Schedules Information Manual (IATA SSIM),
 # published semiannually.  Law sent in several helpful summaries
@@ -76,28 +75,25 @@ Rule RussiaAsia	1996	max	-	Oct	lastSun	 2:00s	0	-
 Zone	Asia/Kabul	4:36:48 -	LMT	1890
 			4:00	-	AFT	1945
 			4:30	-	AFT
 
 # Armenia
-# From Paul Eggert (1999-09-27):
+# From Paul Eggert (1999-10-29):
 # Shanks has Yerevan switching to 3:00 (with Russian DST) in spring 1991,
-# but usno1995 has Armenia at 4:00 (with DST), and Edgar Der-Danieliantz
+# then to 4:00 with no DST in fall 1995, then readopting Russian DST in 1997.
+# Go with Shanks, even when he disagrees with others.  Edgar Der-Danieliantz
 # <edd@AIC.NET> reported (1996-05-04) that Yerevan probably wouldn't use DST
 # in 1996, though it did use DST in 1995.  IATA SSIM (1991/1998) reports that
 # Armenia switched from 3:00 to 4:00 in 1998 and observed DST after 1991,
 # but started switching at 3:00s in 1998.  IATA SSIM (1999-02) reports
 # that they switch one day later in 2001 (i.e. on Mondays).
-# What a mess!  We guess Yerevan DST stayed in sync with Moscow between 1990
-# and 1995, did not use DST in 1996, and started using DST again in 1997.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Yerevan	2:58:00 -	LMT	1924 May  2
 			3:00	-	YERT	1957 Mar    # Yerevan Time
 			4:00 RussiaAsia YER%sT	1991 Mar 31 2:00s
 			3:00	1:00	YERST	1991 Sep 23 # independence
-			3:00	1:00	AMST	1991 Sep 29 2:00s # Armenia Time
-			3:00	-	AMT	1992 Jan 19 2:00s
-			4:00 RussiaAsia	AM%sT	1996
+			3:00 RussiaAsia	AM%sT	1995 Sep 24 2:00s
 			4:00	-	AMT	1997
 			4:00 RussiaAsia	AM%sT			
 
 # Azerbaijan
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -189,11 +185,11 @@ Zone	Asia/Phnom_Penh	6:59:40 -	LMT	1906 Jun  9
 # Shanks writes that China has had a single time zone since 1980 May 1,
 # observing summer DST from 1986 through 1991; this contradicts Devine's
 # note about Time magazine, though apparently _something_ happened in 1986.
 # Go with Shanks for now.  I made up names for the other pre-1980 time zones.
 
-# From Shanks (1995):
+# From Shanks:
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Shang	1940	only	-	Jun	 3	0:00	1:00	D
 Rule	Shang	1940	1941	-	Oct	 1	0:00	0	S
 Rule	Shang	1941	only	-	Mar	16	0:00	1:00	D
 Rule	PRC	1949	only	-	Jan	 1	0:00	0	S
@@ -245,11 +241,11 @@ Zone	Asia/Hong_Kong	7:36:36 -	LMT	1904 Oct 30
 
 ###############################################################################
 
 # Taiwan
 
-# Shanks (1995) writes that Taiwan observed DST during 1945, when it
+# Shanks writes that Taiwan observed DST during 1945, when it
 # was still controlled by Japan.  This is hard to believe, but we don't
 # have any other information.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Taiwan	1945	1951	-	May	1	0:00	1:00	D
@@ -329,10 +325,18 @@ Zone	Asia/Tbilisi	2:59:16 -	LMT	1880
 			3:00 E-EurAsia	GE%sT	1994 Sep lastSun
 			4:00 E-EurAsia	GE%sT	1996 Oct lastSun
 			4:00	1:00	GEST	1997 Mar lastSun
 			4:00 E-EurAsia	GE%sT
 
+# East Timor
+# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
+Zone	Asia/Dili	8:22:20 -	LMT	1912
+			8:00	-	TPT	1942 Feb 21 23:00
+			9:00	-	JST	1945 Aug
+			9:00	-	TPT	1976 May  3
+			8:00	-	TPT	# East Timor Time
+
 # India
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Calcutta	5:53:28 -	LMT	1880
 			5:53:20	-	HMT	1941 Oct    # Howrah Mean Time?
 			6:30	-	BURT	1942 May 15 # Burma Time
@@ -345,11 +349,13 @@ Zone	Asia/Calcutta	5:53:28 -	LMT	1880
 #	Nicobar Is
 
 # Indonesia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Asia/Jakarta	7:07:12 -	LMT	1867 Aug 10
-			7:07:12	-	JMT	1924 Jan  1 0:13 # Jakarta MT
+# Shanks says the next transition was at 1924 Jan 1 0:13,
+# but this must be a typo.
+			7:07:12	-	JMT	1923 Dec 31 23:47:12 # Jakarta
 			7:20	-	JAVT	1932 Nov	 # Java Time
 			7:30	-	JAVT	1942 Mar 23
 			9:00	-	JST	1945 Aug
 			7:30	-	JAVT	1948 May
 			8:00	-	JAVT	1950 May
@@ -458,10 +464,11 @@ Rule	Iraq	1982	1984	-	Oct	1	0:00	0	S
 Rule	Iraq	1983	only	-	Mar	31	0:00	1:00	D
 Rule	Iraq	1984	1985	-	Apr	1	0:00	1:00	D
 Rule	Iraq	1985	1990	-	Sep	lastSun	1:00s	0	S
 Rule	Iraq	1986	1990	-	Mar	lastSun	1:00s	1:00	D
 # IATA SSIM (1991/1996) says Apr 1 12:01am UTC; guess the `:01' is a typo.
+# Shanks says Iraq did not observe DST 1992/1997 or 1999 on; ignore this.
 Rule	Iraq	1991	max	-	Apr	 1	3:00s	1:00	D
 Rule	Iraq	1991	max	-	Oct	 1	3:00s	0	D
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Baghdad	2:57:40	-	LMT	1890
 			2:57:36	-	BMT	1918	    # Baghdad Mean Time?
@@ -475,11 +482,11 @@ Zone	Asia/Baghdad	2:57:40	-	LMT	1890
 
 # From U. S. Naval Observatory (1989-01-19):
 # ISRAEL              2 H  AHEAD OF UTC
 # ISRAEL              3 H  AHEAD OF UTC  APR 10 - SEP 3
 
-# From Shanks (1995):
+# From Shanks:
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Zion	1940	only	-	Jun	 1	0:00	1:00	D
 Rule	Zion	1942	1944	-	Nov	 1	0:00	0	S
 Rule	Zion	1943	only	-	Apr	 1	2:00	1:00	D
 Rule	Zion	1944	only	-	Apr	 1	0:00	1:00	D
@@ -716,20 +723,21 @@ Zone	Asia/Aqtau	3:21:04	-	LMT	1924 May  2 # or Aktau
 			4:00	-	AQTT	1992 Jan 19 2:00s # Aqtau Time
 			5:00 E-EurAsia	AQT%sT	1995 Sep lastSun
 			4:00 E-EurAsia	AQT%sT
 
 # Kirgizstan
+# Transitions through 1991 are from Shanks.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Kirgiz	1992	1996	-	Apr	Sun>=7	0:00	1:00	S
-Rule	Kirgiz	1991	1996	-	Sep	lastSun	0:00	0	-
+Rule	Kirgiz	1992	1996	-	Sep	lastSun	0:00	0	-
 Rule	Kirgiz	1997	max	-	Mar	lastSun	2:30	1:00	S
 Rule	Kirgiz	1997	max	-	Oct	lastSun	2:30	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Bishkek	4:58:24 -	LMT	1924 May  2
 			5:00	-	FRUT	1930 Jun 21 # Frunze Time
 			6:00 RussiaAsia FRU%sT	1991 Mar 31 2:00s
-			5:00	1:00	FRUST	1991 Aug 31 # independence
+			5:00	1:00	FRUST	1991 Aug 31 2:00 # independence
 			5:00	Kirgiz	KG%sT		    # Kirgizstan Time
 
 ###############################################################################
 
 # Korea (North and South)
@@ -737,11 +745,11 @@ Zone	Asia/Bishkek	4:58:24 -	LMT	1924 May  2
 # From Guy Harris:
 # According to someone at the Korean Times in San Francisco,
 # Daylight Savings Time was not observed until 1987.  He did not know
 # at what time of day DST starts or ends.
 
-# From Shanks (1995):
+# From Shanks:
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	ROK	1960	only	-	May	15	0:00	1:00	D
 Rule	ROK	1960	only	-	Sep	13	0:00	0	S
 Rule	ROK	1987	1988	-	May	Sun<=14	0:00	1:00	D
 Rule	ROK	1987	1988	-	Oct	Sun<=14	0:00	0	S
@@ -835,22 +843,22 @@ Zone	Indian/Maldives	4:54:00 -	LMT	1880	# Male
 			5:00	-	MVT		# Maldives Time
 
 # Mongolia
 # Shanks says that Mongolia has three time zones, but usno1995 and the CIA map
 # Standard Time Zones of the World (1997-01)
-# </a>
 # both say that it has just one.
 # Let's comment out the western and eastern Mongolian time zones
 # till we know what their principal towns are.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Mongol	1981	1984	-	Apr	1	0:00	1:00	S
 Rule	Mongol	1981	1984	-	Oct	1	0:00	0	-
 Rule	Mongol	1985	1990	-	Mar	lastSun	2:00	1:00	S
 Rule	Mongol	1985	1990	-	Sep	lastSun	3:00	0	-
 Rule	Mongol	1991	max	-	Mar	lastSun	0:00	1:00	S
 Rule	Mongol	1991	1995	-	Sep	lastSun	0:00	0	-
-Rule	Mongol	1996	only	-	Oct	Fri>=22	0:00	0	-
+# IATA SSIM (1996-09) says 1996-10-25; go with Shanks.
+Rule	Mongol	1996	only	-	Oct	lastSun	0:00	0	-
 Rule	Mongol	1997	max	-	Sep	lastSun	0:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 #Zone	Asia/Dariv	6:14:32 -	LMT	1905 Aug
 #			6:00	-	DART	1978	# Dariv Time
 #			7:00	Mongol	DAR%sT
@@ -1026,11 +1034,10 @@ Zone	Asia/Singapore	6:55:24 -	LMT	1880
 # "Sri Lanka advances clock by an hour to avoid blackout"
 # (www.virtual-pc.com/lankaweb/news/items/240596-2.html, 1996-05-24,
 # no longer available as of 1999-08-17)
 # reported ``the country's standard time will be put forward by one hour at
 # midnight Friday (1830 GMT) `in the light of the present power crisis'.''
-# Transitions before 1996 are from Shanks (1995).
 #
 # From Dharmasiri Senanayake, Sri Lanka Media Minister (1996-10-24), as quoted
 # by Shamindra in
 # <a href="news:54rka5$m5h@mtinsc01-mgt.ops.worldnet.att.net">
 # Daily News - Hot News Section (1996-10-26)
@@ -1076,78 +1083,76 @@ Rule	Syria	1990	only	-	Sep	30	2:00	0	-
 Rule	Syria	1991	only	-	Apr	 1	0:00	1:00	S
 Rule	Syria	1991	1992	-	Oct	 1	0:00	0	-
 Rule	Syria	1992	only	-	Apr	 8	0:00	1:00	S
 Rule	Syria	1993	only	-	Mar	26	0:00	1:00	S
 Rule	Syria	1993	only	-	Sep	25	0:00	0	-
-# IATA SSIM (1996-09) says 1997-03-31; (1998-02) says 1998-04-02;
+# IATA SSIM (1998-02) says 1998-04-02;
 # (1998-09) says 1999-03-29 and 1999-09-29; (1999-02) says 1999-04-02,
-# 2000-04-02, and 2001-04-02; ignore all these claims for now.
-Rule	Syria	1994	max	-	Apr	 1	0:00	1:00	S
+# 2000-04-02, and 2001-04-02; ignore all these claims and go with Shanks.
+Rule	Syria	1994	1996	-	Apr	 1	0:00	1:00	S
 Rule	Syria	1994	max	-	Oct	 1	0:00	0	-
+Rule	Syria	1997	1998	-	Mar	lastMon	0:00	1:00	S
+Rule	Syria	1999	max	-	Apr	 1	0:00	1:00	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Damascus	2:25:12 -	LMT	1920
 			2:00	Syria	EE%sT
 
 # Tajikistan
-# From Shanks (1995), who writes ``date of change uncertain'' for 1991.
+# From Shanks.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Dushanbe	4:35:12 -	LMT	1924 May  2
 			5:00	-	DUST	1930 Jun 21 # Dushanbe Time
 			6:00 RussiaAsia DUS%sT	1991 Mar 31 2:00s
-			5:00	1:00	DUSST	1991 Sep  9 # independence
-			5:00 RussiaAsia	TJ%sT	1992
+			5:00	1:00	DUSST	1991 Sep  9 2:00s
 			5:00	-	TJT		    # Tajikistan Time
 
 # Thailand
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Bangkok	6:42:04	-	LMT	1880
 			6:42:04	-	BMT	1920 Apr # Bangkok Mean Time
 			7:00	-	ICT
 
 # Turkmenistan
-# From Shanks (1995):
+# From Shanks.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Ashkhabad	3:53:32 -	LMT	1924 May  2 # or Ashgabat
 			4:00	-	ASHT	1930 Jun 21 # Ashkhabad Time
-			5:00	-	ASHT	1981 Apr  1
-			5:00	1:00	ASHST	1981 Oct  1
-			6:00	-	ASHT	1982 Apr  1
-			5:00 RussiaAsia	ASH%sT	1991
-			5:00	-	ASHT	1991 Oct 27 # independence
-			5:00 RussiaAsia	TM%sT	1993	# Turkmenistan Time
+			5:00 RussiaAsia	ASH%sT	1991 Mar 31 2:00
+			4:00 RussiaAsia	ASH%sT	1991 Oct 27 # independence
+			4:00 RussiaAsia TM%sT	1992 Jan 19 2:00
 			5:00	-	TMT
 
 # United Arab Emirates
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Dubai	3:41:12 -	LMT	1920
 			4:00	-	GST
 
 # Uzbekistan
-# From Shanks (1995):
+# 1991 transitions are from Shanks.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Samarkand	4:27:12 -	LMT	1924 May  2
 			4:00	-	SAMT	1930 Jun 21 # Samarkand Time
 			5:00	-	SAMT	1981 Apr  1
 			5:00	1:00	SAMST	1981 Oct  1
 			6:00 RussiaAsia TAS%sT	1991 Mar 31 2:00 # Tashkent Time
-			5:00	-	TAST	1991 Sep  1 # independence
-			5:00	-	UZT	1992
+			5:00 RussiaAsia	TAS%sT	1991 Sep  1 # independence
+			5:00 RussiaAsia	UZ%sT	1992
 			5:00 RussiaAsia	UZ%sT	1993
 			5:00	-	UZT
 Zone	Asia/Tashkent	4:37:12 -	LMT	1924 May  2
 			5:00	-	TAST	1930 Jun 21 # Tashkent Time
 			6:00 RussiaAsia TAS%sT	1991 Mar 31 2:00s
-			5:00	-	TAST	1991 Sep  1 # independence
-			5:00	-	UZT	1992
+			5:00 RussiaAsia	TAS%sT	1991 Sep  1 # independence
+			5:00 RussiaAsia	UZ%sT	1992
 			5:00 RussiaAsia	UZ%sT	1993
 			5:00	-	UZT
 
 # Vietnam
 # From Paul Eggert <eggert@twinsun.com> (1993-11-18):
 # Saigon's official name is Thanh-Pho Ho Chi Minh, but it's too long.
 # We'll stick with the traditional name for now.
-# From Shanks (1991):
+# From Shanks:
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Saigon	7:06:40 -	LMT	1906 Jun  9
 			7:06:20	-	SMT	1911 Mar 11 0:01 # Saigon MT?
 			7:00	-	ICT	1912 May
 			8:00	-	ICT	1931 May
diff --git a/timezone/australasia b/timezone/australasia
index 0dbb9da88..1782558de 100644
--- a/timezone/australasia
+++ b/timezone/australasia
@@ -1,17 +1,16 @@
-# @(#)australasia	7.51
+# @(#)australasia	7.52
 # This file also includes Pacific islands.
 
 # Notes are at the end of this file
 
 ###############################################################################
 
 # Australia
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-# Shanks gives 1917 Jan 1 0:01; go with Whitman (and guess 2:00).
-Rule	Aus	1916	only	-	Oct	 1	2:00	1:00	-
+Rule	Aus	1917	only	-	Jan	 1	0:01	1:00	-
 Rule	Aus	1917	only	-	Mar	25	2:00	0	-
 Rule	Aus	1942	only	-	Jan	 1	2:00	1:00	-
 Rule	Aus	1942	only	-	Mar	29	2:00	0	-
 Rule	Aus	1942	only	-	Sep	27	2:00	1:00	-
 Rule	Aus	1943	1944	-	Mar	lastSun	2:00	0	-
@@ -22,15 +21,13 @@ Rule	Aus	1943	only	-	Oct	 3	2:00	1:00	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Northern Territory
 Zone Australia/Darwin	 8:43:20 -	LMT	1895 Feb
 			 9:00	-	CST	1899 May
-			 9:30	-	CST	1917 Jan 1 0:01
 			 9:30	Aus	CST
 # Western Australia
 Zone Australia/Perth	 7:43:24 -	LMT	1895 Dec
-			 8:00	-	WST	1917 Jan 1 0:01
 			 8:00	Aus	WST	1943 Jul
 			 8:00	-	WST	1974 Oct lastSun 2:00s
 			 8:00	1:00	WST	1975 Mar Sun>=1 2:00s
 			 8:00	-	WST	1983 Oct lastSun 2:00s
 			 8:00	1:00	WST	1984 Mar Sun>=1 2:00s
@@ -56,15 +53,13 @@ Rule	AQ	1972	only	-	Feb	lastSun	2:00s	0	-
 Rule	AQ	1989	1991	-	Oct	lastSun	2:00s	1:00	-
 Rule	AQ	1990	1992	-	Mar	Sun>=1	2:00s	0	-
 Rule	Holiday	1992	1993	-	Oct	lastSun	2:00s	1:00	-
 Rule	Holiday	1993	1994	-	Mar	Sun>=1	2:00s	0	-
 Zone Australia/Brisbane	10:12:08 -	LMT	1895
-			10:00	-	EST	1917 Jan 1 0:01
 			10:00	Aus	EST	1971
 			10:00	AQ	EST
 Zone Australia/Lindeman  9:55:56 -	LMT	1895
-			10:00	-	EST	1917 Jan 1 0:01
 			10:00	Aus	EST	1971
 			10:00	AQ	EST	1992 Jul
 			10:00	Holiday	EST
 
 # South Australia
@@ -79,11 +74,10 @@ Rule	AS	1990	1994	even	Mar	Sun>=18	2:00s	0	-
 Rule	AS	1990	1994	odd	Mar	Sun>=1	2:00s	0	-
 Rule	AS	1995	max	-	Mar	lastSun	2:00s	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Australia/Adelaide	9:14:20 -	LMT	1895 Feb
 			9:00	-	CST	1899 May
-			9:30	-	CST	1917 Jan 1 0:01
 			9:30	Aus	CST	1971
 			9:30	AS	CST
 
 # Tasmania
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -97,15 +91,18 @@ Rule	AT	1982	1983	-	Mar	lastSun	2:00s	0	-
 Rule	AT	1984	1986	-	Mar	Sun>=1	2:00s	0	-
 Rule	AT	1986	only	-	Oct	Sun>=15	2:00s	1:00	-
 Rule	AT	1987	1990	-	Mar	Sun>=15	2:00s	0	-
 Rule	AT	1987	only	-	Oct	Sun>=22	2:00s	1:00	-
 Rule	AT	1988	1990	-	Oct	lastSun	2:00s	1:00	-
-Rule	AT	1991	max	-	Oct	Sun>=1	2:00s	1:00	-
+Rule	AT	1991	1999	-	Oct	Sun>=1	2:00s	1:00	-
 Rule	AT	1991	max	-	Mar	lastSun	2:00s	0	-
+Rule	AT	2000	only	-	Aug	lastSun	2:00s	1:00	-
+Rule	AT	2001	max	-	Oct	Sun>=1	2:00s	1:00	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Australia/Hobart	9:49:16	-	LMT	1895 Sep
-			10:00	-	EST	1917 Jan 1 0:01
+			10:00	-	EST	1916 Oct 1 2:00
+			10:00	1:00	EST	1917 Feb
 			10:00	Aus	EST	1967
 			10:00	AT	EST
 
 # Victoria
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -119,11 +116,10 @@ Rule	AV	1991	1994	-	Mar	Sun>=1	2:00s	0	-
 Rule	AV	1995	max	-	Mar	lastSun	2:00s	0	-
 Rule	AV	2000	only	-	Aug	lastSun	2:00s	1:00	-
 Rule	AV	2001	max	-	Oct	lastSun	2:00s	1:00	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Australia/Melbourne 9:39:52 -	LMT	1895 Feb
-			10:00	-	EST	1917 Jan 1 0:01
 			10:00	Aus	EST	1971
 			10:00	AV	EST
 
 # New South Wales
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
@@ -139,30 +135,28 @@ Rule	AN	1990	1995	-	Mar	Sun>=1	2:00s	0	-
 Rule	AN	1996	max	-	Mar	lastSun	2:00s	0	-
 Rule	AN	2000	only	-	Aug	lastSun	2:00s	1:00	-
 Rule	AN	2001	max	-	Oct	lastSun	2:00s	1:00	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Australia/Sydney	10:04:52 -	LMT	1895 Feb
-			10:00	-	EST	1917 Jan 1 0:01
 			10:00	Aus	EST	1971
 			10:00	AN	EST
 Zone Australia/Broken_Hill 9:25:48 -	LMT	1895 Feb
 			10:00	-	EST	1896 Aug 23
 			9:00	-	CST	1899 May
-			9:30	-	CST	1917 Jan 1 0:01
 			9:30	Aus	CST	1971
 			9:30	AN	CST	2000
 			9:30	AS	CST
 
 # Lord Howe Island
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	LH	1981	1984	-	Oct	lastSun	2:00s	1:00	-
 Rule	LH	1982	1985	-	Mar	Sun>=1	2:00s	0	-
 Rule	LH	1985	only	-	Oct	lastSun	2:00s	0:30	-
-Rule	LH	1986	1989	-	Mar	Sun>=15	2:00s	0	-
+Rule	LH	1986	1991	-	Mar	Sun>=15	2:00s	0	-
 Rule	LH	1986	only	-	Oct	19	2:00s	0:30	-
 Rule	LH	1987	max	-	Oct	lastSun	2:00s	0:30	-
-Rule	LH	1990	1995	-	Mar	Sun>=1	2:00s	0	-
+Rule	LH	1992	1995	-	Mar	Sun>=1	2:00s	0	-
 Rule	LH	1996	max	-	Mar	lastSun	2:00s	0	-
 Zone Australia/Lord_Howe 10:36:20 -	LMT	1895 Feb
 			10:00	-	EST	1981 Mar
 			10:30	LH	LHST
 
@@ -191,11 +185,11 @@ Zone Australia/Lord_Howe 10:36:20 -	LMT	1895 Feb
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Indian/Christmas	7:02:52 -	LMT	1895 Feb
 			7:00	-	CXT	# Christmas Island Time
 
 # Cook Is
-# From Shanks (1995):
+# From Shanks:
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Cook	1978	only	-	Nov	12	0:00	0:30	HS
 Rule	Cook	1979	1991	-	Mar	Sun>=1	0:00	0	-
 Rule	Cook	1979	1990	-	Oct	lastSun	0:00	0:30	HS
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -269,12 +263,13 @@ Zone Pacific/Yap	9:12:32	-	LMT	1901		# Colonia
 Zone Pacific/Truk	10:07:08 -	LMT	1901
 			10:00	-	TRUT			# Truk Time
 Zone Pacific/Ponape	10:32:52 -	LMT	1901		# Kolonia
 			11:00	-	PONT			# Ponape Time
 Zone Pacific/Kosrae	10:51:56 -	LMT	1901
-			11:00	-	PONT	1969 Oct
-			12:00	-	KOST			# Kosrae Time
+			11:00	-	KOST	1969 Oct	# Kosrae Time
+			12:00	-	KOST	1999
+			11:00	-	KOST
 
 # Nauru
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Nauru	11:07:40 -	LMT	1921 Jan 15	# Uaobe
 			11:30	-	NRT	1942 Mar 15	# Nauru Time
@@ -285,10 +280,11 @@ Zone	Pacific/Nauru	11:07:40 -	LMT	1921 Jan 15	# Uaobe
 # New Caledonia
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	NC	1977	1978	-	Dec	Sun>=1	0:00	1:00	S
 Rule	NC	1978	1979	-	Feb	27	0:00	0	-
 Rule	NC	1996	only	-	Dec	 1	2:00s	1:00	S
+# Shanks says the following was at 2:00; go with IATA.
 Rule	NC	1997	only	-	Mar	 2	2:00s	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Noumea	11:05:48 -	LMT	1912 Jan 13
 			11:00	NC	NC%sT
 
@@ -392,14 +388,13 @@ Zone Pacific/Guadalcanal 10:39:48 -	LMT	1912 Oct	# Honiara
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fakaofo	-11:24:56 -	LMT	1901
 			-10:00	-	TKT	# Tokelau Time
 
 # Tonga
-# Transition time is a guess--see below
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Tonga	1999	max	-	Oct	Sat>=1	0:00	1:00	S
-Rule	Tonga	2000	max	-	Apr	Sat>=15	0:00	-	-
+Rule	Tonga	1999	max	-	Oct	Sat>=1	2:00s	1:00	S
+Rule	Tonga	2000	max	-	Apr	Sun>=16	2:00s	-	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Pacific/Tongatapu	12:19:20 -	LMT	1901
 			12:20	-	TOT	1941 # Tonga Time
 			13:00	-	TOT	1999
 			13:00	Tonga	TO%sT
@@ -465,14 +460,14 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 
 # 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
 # tz@elsie.nci.nih.gov for general use in the future).
 
-# From Paul Eggert <eggert@twinsun.com> (1999-03-22):
+# From Paul Eggert <eggert@twinsun.com> (1999-10-29):
 # A good source for time zone historical data outside the U.S. is
-# Thomas G. Shanks, The International Atlas (4th edition),
-# San Diego: ACS Publications, Inc. (1995).
+# Thomas G. Shanks, The International Atlas (5th edition),
+# San Diego: ACS Publications, Inc. (1999).
 #
 # Gwillim Law <LAW@encmail.encompass.com> writes that a good source
 # for recent time zone data is the International Air Transport
 # Association's Standard Schedules Information Manual (IATA SSIM),
 # published semiannually.  Law sent in several helpful summaries
@@ -731,10 +726,17 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # From Bill Hart via Guy Harris (1991-10-10):
 # Oh yes, the new daylight savings rules are uniquely tasmanian, we have
 # 6 weeks a year now when we are out of sync with the rest of Australia
 # (but nothing new about that).
 
+# From Alex Livingston (1999-10-04):
+# I heard on the ABC (Australian Broadcasting Corporation) radio news on the
+# (long) weekend that Tasmania, which usually goes its own way in this regard,
+# has decided to join with most of NSW, the ACT, and most of Victoria
+# (Australia) and start daylight saving on the last Sunday in August in 2000
+# instead of the first Sunday in October.
+
 # Victoria
 
 # The rules for 1971 through 1991 were reported by George Shepherd
 # via Simon Woodhead via Robert Elz (1991-03-06):
 # #   The state of VICTORIA.. [ Courtesy of Vic. Dept of Premier + Cabinet ]
@@ -882,15 +884,15 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # Robert Uzgalis <buz@cs.aukuni.ac.nz> writes that the New Zealand Daylight
 # Savings Time Order in Council dated 1990-06-18 specifies 2:00 standard
 # time on both the first Sunday in October and the third Sunday in March.
 # As with Australia, we'll assume the tradition is 2:00s, not 2:00.
 #
-# From Paul Eggert (1996-11-22):
-# Shanks gives no data for Chatham; usno1989 says it's +12:45,
-# usno1995 says it's +12:45/+13:45, and IATA SSIM (1991/1996)
+# From Paul Eggert (1999-10-29):
+# Shanks gives no time data for Chatham; usno1989 says it's +12:45,
+# usno1995 says it's +12:45/+13:45, and IATA SSIM (1991/1999)
 # gives the NZ rules but with transitions at 2:45 local standard time.
-# Guess that they adopted DST in 1990.
+# Guess that they have been in lock-step with NZ since 1990.
 
 ###############################################################################
 
 # Fiji
 
@@ -943,10 +945,18 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # (now properly known as Chuuk) ... is in the time zone GMT+10.''
 #
 # Shanks writes that Truk switched from GMT+10 to GMT+11 on 1978-10-01;
 # ignore this for now.
 
+# From Paul Eggert (1999-10-29):
+# The Federated States of Micronesia Visitors Board writes in
+# <a href="http://www.fsmgov.org/info/clocks.html">
+# The Federated States of Micronesia - Visitor Information
+# </a> (1999-01-26)
+# that Truk and Yap are GMT+10, and Ponape and Kosrae are GMT+11.
+# We don't know when Kosrae switched from GMT+12; assume January 1 for now.
+
 # Samoa
 
 # Howse writes (p 153, citing p 10 of the 1883-11-18 New York Herald)
 # that in 1879 the King of Samoa decided to change
 # ``the date in his kingdom from the Antipodean to the American system,
@@ -1016,5 +1026,9 @@ Zone	Pacific/Wallis	12:15:20 -	LMT	1901
 # and annually thereafter from the first Saturday in October through the 
 # third Saturday of April.  Under the system approved by Privy Council on 
 # Sept. 10, clocks must be turned ahead one hour on the opening day and 
 # set back an hour on the closing date."
 # Alas, no indication of the time of day.
+
+# From Rives McDow (1999-10-06):
+# Tonga started its Daylight Saving on Saturday morning October 2nd at 0200am.
+# Daylight Saving ends on April 16 at 0300am which is Sunday morning.
diff --git a/timezone/backward b/timezone/backward
index 84f3de51b..23b76cba5 100644
--- a/timezone/backward
+++ b/timezone/backward
@@ -1,11 +1,12 @@
-# @(#)backward	7.15
+# @(#)backward	7.16
 
 # This file provides links between current names for time zones
 # and their old names.  Many names changed in late 1993.
 
 Link	America/Adak		America/Atka
+Link	America/Tijuana		America/Ensenada
 Link	America/Indianapolis	America/Fort_Wayne
 Link	America/Indiana/Knox	America/Knox_IN
 Link	America/St_Thomas	America/Virgin
 Link	Asia/Jerusalem		Asia/Tel_Aviv
 Link	Australia/Sydney	Australia/ACT
diff --git a/timezone/checktab.awk b/timezone/checktab.awk
index 43ecc92df..6a2d19ae0 100644
--- a/timezone/checktab.awk
+++ b/timezone/checktab.awk
@@ -1,8 +1,8 @@
 # Check tz tables for consistency.
 
-# @(#)checktab.awk	1.5
+# @(#)checktab.awk	1.6
 
 # Contributed by Paul Eggert <eggert@twinsun.com>.
 
 BEGIN {
 	FS = "\t"
@@ -146,11 +146,11 @@ END {
 	}
 
 	if (0 < want_warnings) {
 		for (cc in cc2name) {
 			if (!cc_used[cc]) {
-				printf "%s:%d: warning:" \
+				printf "%s:%d: warning: " \
 					"no Zone entries for %s (%s)\n", \
 					iso_table, cc2NR[cc], cc, cc2name[cc]
 			}
 		}
 	}
diff --git a/timezone/europe b/timezone/europe
index ea38d124a..cdbc667c7 100644
--- a/timezone/europe
+++ b/timezone/europe
@@ -1,15 +1,15 @@
-# @(#)europe	7.65
+# @(#)europe	7.66
 
 # 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
 # tz@elsie.nci.nih.gov for general use in the future).
 
-# From Paul Eggert <eggert@twinsun.com> (1999-03-22):
+# From Paul Eggert <eggert@twinsun.com> (1999-10-29):
 # A good source for time zone historical data outside the U.S. is
-# Thomas G. Shanks, The International Atlas (4th edition),
-# San Diego: ACS Publications, Inc. (1995).
+# Thomas G. Shanks, The International Atlas (5th edition),
+# San Diego: ACS Publications, Inc. (1999).
 #
 # Gwillim Law <LAW@encmail.encompass.com> writes that a good source
 # for recent time zone data is the International Air Transport
 # Association's Standard Schedules Information Manual (IATA SSIM),
 # published semiannually.  Law sent in several helpful summaries
@@ -722,14 +722,14 @@
 # 1917-1921 need to be resolved for the Channel Islands, and it isn't
 # clear whether the islands were using GMT or local time then.  The
 # changes in Alderney and Guernsey were at the same 2am GMT time as
 # for Great Britain; the order for Jersey is more interesting.
 #
-# From Paul Eggert (1999-10-06):
+# From Paul Eggert (1999-10-22):
 # Mark Brader kindly translated the 1916 Jersey order from the French.
 # It says that the 1916 transitions were 05-20 and 09-30 at midnight.
-# Presumably this was 24:00, two hours earlier than Great Britain.
+# No doubt this was 24:00, two or three hours earlier than Great Britain.
 # It also says that after 1916 they'll sync with Great Britain.
 
 # From Joseph S. Myers (1999-09-28):
 # I have the 1918 orders for Guernsey, Alderney (both changing on same
 # dates as UK, 2am GMT) and Sark (same dates; start and end at 2am,
@@ -1003,13 +1003,10 @@ Rule	Russia	1918	only	-	May	31	22:00	2:00	MDST	# Moscow Double Summer Time
 Rule	Russia	1918	only	-	Sep	17	 0:00	1:00	MST
 Rule	Russia	1919	only	-	May	31	23:00	2:00	MDST
 Rule	Russia	1919	only	-	Jul	 1	 2:00	1:00	S
 Rule	Russia	1919	only	-	Aug	16	 0:00	0	-
 Rule	Russia	1921	only	-	Feb	14	23:00	1:00	S
-# Shanks gives 1921 Mar 21 for the following transition.
-# From Andrey A. Chernov <ache@astral.msk.su> (1993-11-12):
-# My sources says, that it is Mar 20, not 21.
 Rule	Russia	1921	only	-	Mar	20	23:00	2:00	M # Midsummer
 Rule	Russia	1921	only	-	Sep	 1	 0:00	1:00	S
 Rule	Russia	1921	only	-	Oct	 1	 0:00	0	-
 # Act No.925 of the Council of Ministers of the USSR (1980-10-24):
 Rule	Russia	1981	1984	-	Apr	 1	 0:00	1:00	S
@@ -1088,11 +1085,11 @@ Rule	Albania	1983	only	-	Apr	18	0:00	1:00	S
 Rule	Albania	1983	only	-	Oct	 1	0:00	0	-
 Rule	Albania	1984	only	-	Apr	 1	0:00	1:00	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Tirane	1:19:20 -	LMT	1914
 			1:00	-	CET	1940 Jun 16
-# The following transition is from Shanks's 4th edition (1995).
+# The following transition is from Shanks.
 			1:00	Albania	CE%sT	1984 Jul
 			1:00	EU	CE%sT
 
 # Andorra
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
@@ -1118,21 +1115,22 @@ Zone	Europe/Vienna	1:05:20 -	LMT	1893 Apr
 			1:00	C-Eur	CE%sT	1945 Apr  2 2:00
 			1:00	Austria	CE%sT	1981
 			1:00	EU	CE%sT
 
 # Belarus
-# Transitions before 1991 are from Shanks (1995).
+# Transitions before 1991 are from Shanks.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Minsk	1:50:16 -	LMT	1880
 			1:50	-	MMT	1924 May 2 # Minsk Mean Time
 			2:00	-	EET	1930 Jun 21
 			3:00	-	MSK	1941 Jun 28
 			1:00	C-Eur	CE%sT	1944 Jul  3
-			3:00	Russia	MSK/MSD	1991 Mar 31 2:00s
+			3:00	Russia	MSK/MSD	1990
+			3:00	-	MSK	1991 Mar 31 2:00s
 			2:00	1:00	EEST	1991 Sep 29 2:00s
-			2:00	-	EET	1992 Mar 29 2:00s
-			2:00	1:00	EEST	1992 Sep 27 2:00s
+			2:00	-	EET	1992 Mar 29 0:00s
+			2:00	1:00	EEST	1992 Sep 27 0:00s
 			2:00	Russia	EE%sT
 
 # Belgium
 #
 # From Paul Eggert (1997-07-02):
@@ -1364,11 +1362,10 @@ Zone	Europe/Helsinki	1:39:52 -	LMT	1878 May 31
 			2:00	EU	EE%sT
 
 # France
 #
 # Shanks seems to use `24:00' ambiguously; we resolve it with Whitman.
-# From Shanks (1991):
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	France	1916	only	-	Jun	14	23:00s	1:00	S
 Rule	France	1916	1919	-	Oct	Sun>=1	23:00s	0	-
 Rule	France	1917	only	-	Mar	24	23:00s	1:00	S
 Rule	France	1918	only	-	Mar	 9	23:00s	1:00	S
@@ -1452,11 +1449,10 @@ Rule	Germany	1945	only	-	Apr	 2	2:00s	1:00	S
 # (1961-11-25), which gives dates only.  Guess 3:00 transition times.
 Rule	Germany	1945	only	-	May	31	3:00	2:00	M # Midsummer
 Rule	Germany	1945	only	-	Sep	23	3:00	1:00	S
 Rule	Germany	1945	only	-	Nov	18	2:00s	0	-
 Rule	Germany	1946	only	-	Apr	14	2:00s	1:00	S
-# Shanks gives 1946-10-06; go with the PTB.
 Rule	Germany	1946	only	-	Oct	 7	2:00s	0	-
 Rule	Germany	1947	1949	-	Oct	Sun>=1	2:00s	0	-
 Rule	Germany	1947	only	-	Apr	 6	2:00s	1:00	S
 # The PTB gives 3:00 CET and 3:00 CEST for the midsummer transition times;
 # go with Shanks.
@@ -1569,14 +1565,14 @@ Zone	Europe/Budapest	1:16:20 -	LMT	1890 Oct
 #	(old style), or on St. Luke's day, if a Saturday.
 # St. Luke's day ought to be traceable from ecclesiastical sources. "old style"
 # might be a reference to the Julian calendar as opposed to Gregorian, or it
 # might mean something else (???).
 #
-# From Paul Eggert <eggert@twinsun.com> (1993-12-09):
+# From Paul Eggert <eggert@twinsun.com> (1999-10-29):
 # The Iceland Almanak, Shanks and Whitman disagree on many points.
 # We go with the Almanak, except for one claim from Shanks, namely that
-# Reykavik was -1:28 from 1837 to 1908, local mean time before that.
+# Reykavik was 21W57 from 1837 to 1908, local mean time before that.
 #
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Iceland	1917	1918	-	Feb	19	23:00	1:00	S
 Rule	Iceland	1917	only	-	Oct	21	 1:00	0	-
 Rule	Iceland	1918	only	-	Nov	16	 1:00	0	-
@@ -1726,12 +1722,10 @@ Zone	Europe/Riga	1:36:24	-	LMT	1880
 			1:36:24	1:00	LST	1919 May 22 3:00
 			1:36:24	-	RMT	1926 May 11
 			2:00	-	EET	1940 Aug  5
 			3:00	-	MSK	1941 Jul
 			1:00	C-Eur	CE%sT	1944 Oct 13
-			# Shanks says 1944-08-08, but
-			# Riga fell to the Red Army on 1944-10-13.
 			3:00	Russia	MSK/MSD	1989 Mar lastSun 2:00s
 			2:00	1:00	EEST	1989 Sep lastSun 2:00s
 			2:00	Latvia	EE%sT	1997 Jan 21
 			2:00	EU	EE%sT
 
@@ -1830,16 +1824,18 @@ Zone	Europe/Malta	0:58:04 -	LMT	1893 Nov  2	# Valletta
 			1:00	Italy	CE%sT	1973 Mar 31
 			1:00	Malta	CE%sT	1981
 			1:00	EU	CE%sT
 
 # Moldova
+# see commentary for Romania
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Chisinau	1:55:20 -	LMT	1924 May  2
 			2:00	-	EET	1930 Jun 21
 			3:00	Russia	MSK/MSD	1991 Mar 31 2:00s
 			2:00	1:00	EEST	1991 Sep 29 2:00s
-			2:00	E-Eur	EE%sT
+			2:00	E-Eur	EE%sT	1997
+			2:00	EU	EE%sT
 
 # Monaco
 # Shanks gives 0:09 for Paris Mean Time; go with Howse's more precise 0:09:21.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Monaco	0:29:32 -	LMT	1891 Mar 15
@@ -1850,11 +1846,11 @@ Zone	Europe/Monaco	0:29:32 -	LMT	1891 Mar 15
 
 # Netherlands
 # Howse writes that the Netherlands' railways used GMT between 1892 and 1940,
 # but for other purposes the Netherlands used Amsterdam mean time.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-# Shanks gives 1916 May 1 0:00 and 1916 Oct 1 0:00; go with Whitman.
+# Shanks gives 1916 Apr 30 24:00 and 1916 Oct 1 00:00; go with Whitman.
 Rule	Neth	1916	only	-	May	 1	2:00s	1:00	NST	# Netherlands Summer Time
 Rule	Neth	1916	only	-	Oct	 2	2:00s	0	AMT	# Amsterdam Mean Time
 Rule	Neth	1917	only	-	Apr	16	2:00s	1:00	NST
 Rule	Neth	1917	only	-	Sep	17	2:00s	0	AMT
 # Whitman gives 1918 Apr 14, 1918 Oct 31, and 1921 Sep 28; go with Shanks.
@@ -1876,11 +1872,10 @@ Rule	Neth	1937	only	-	Jul	 1	0:00	1:00	S
 Rule	Neth	1937	1939	-	Oct	Sun>=2	2:00s	0	-
 # Whitman gives 1939 Apr 15 and 1940 Apr 19; go with Shanks.
 Rule	Neth	1938	1939	-	May	15	2:00s	1:00	S
 Rule	Neth	1945	only	-	Apr	 2	2:00s	1:00	S
 Rule	Neth	1945	only	-	May	20	2:00s	0	-
-# Before 1937, Shanks says just `0:20'; we use Whitman's more precise figure.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Europe/Amsterdam	0:19:28 -	LMT	1892 May
 			0:19:28	Neth	%s	1937 Jul
 			0:20	Neth	NE%sT	1940 May 16 0:40
 			1:00	C-Eur	CE%sT	1945 Apr  2 2:00
@@ -2065,10 +2060,18 @@ Zone Atlantic/Madeira	-1:07:36 -	LMT	1884		# Funchal
 			-1:00	Port	MAD%sT	1966 Apr  3 2:00 # Madeira Time
 			 0:00	Port	WE%sT	1983 Sep 25 1:00s
 			 0:00	EU	WE%sT
 
 # Romania
+#
+# From Paul Eggert (1999-10-07):
+# <a href="http://www.nineoclock.ro/POL/1778pol.html">
+# Nine O'clock</a> (1998-10-23) reports that the switch occurred at
+# 04:00 local time in fall 1998.  For lack of better info,
+# assume that Romania and Moldova switched to EU rules in 1997,
+# the same year as Bulgaria.
+#
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Romania	1932	only	-	May	21	 0:00s	1:00	S
 Rule	Romania	1932	1939	-	Oct	Sun>=1	 0:00s	0	-
 Rule	Romania	1933	1939	-	Apr	Sun>=2	 0:00s	1:00	S
 Rule	Romania	1979	only	-	May	27	 0:00	1:00	S
@@ -2081,11 +2084,12 @@ Rule	Romania	1991	1993	-	Sep	lastSun	 0:00s	0	-
 Zone Europe/Bucharest	1:44:24 -	LMT	1891 Oct
 			1:44:24	-	BMT	1931 Jul 24	# Bucharest MT
 			2:00	Romania	EE%sT	1981 Mar 29 2:00s
 			2:00	C-Eur	EE%sT	1991
 			2:00	Romania	EE%sT	1994
-			2:00	E-Eur	EE%sT
+			2:00	E-Eur	EE%sT	1997
+			2:00	EU	EE%sT
 
 # Russia
 
 # From Paul Eggert <eggert@twinsun.com> (1996-11-22):
 # Except for Moscow after 1919-07-01, I invented the time zone abbreviations,
@@ -2291,11 +2295,11 @@ Zone Europe/Stockholm	1:12:12 -	LMT	1878 May 31
 # mean time in preference to apparent time -- Geneva from 1780 ....
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # From Whitman (who writes ``Midnight?''):
 Rule	Swiss	1940	only	-	Nov	 2	0:00	1:00	S
 Rule	Swiss	1940	only	-	Dec	31	0:00	0	-
-# From Shanks (1991):
+# From Shanks:
 Rule	Swiss	1941	1942	-	May	Sun>=1	2:00	1:00	S
 Rule	Swiss	1941	1942	-	Oct	Sun>=1	0:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Europe/Zurich	0:34:08 -	LMT	1848 Sep 12
 			0:29:44	-	BMT	1894 Jun # Bern Mean Time
@@ -2314,11 +2318,10 @@ Rule	Turkey	1922	only	-	Mar	26	0:00	1:00	S
 Rule	Turkey	1922	only	-	Oct	 8	0:00	0	-
 # Whitman gives 1923 Apr 28 - Sep 16 and no DST in 1924-1925; go with Shanks.
 Rule	Turkey	1924	only	-	May	13	0:00	1:00	S
 Rule	Turkey	1924	1925	-	Oct	 1	0:00	0	-
 Rule	Turkey	1925	only	-	May	 1	0:00	1:00	S
-# Shanks omits the first two transitions in 1940; go with Whitman.
 Rule	Turkey	1940	only	-	Jun	30	0:00	1:00	S
 Rule	Turkey	1940	only	-	Oct	 5	0:00	0	-
 Rule	Turkey	1940	only	-	Dec	 1	0:00	1:00	S
 Rule	Turkey	1941	only	-	Sep	21	0:00	0	-
 Rule	Turkey	1942	only	-	Apr	 1	0:00	1:00	S
diff --git a/timezone/iso3166.tab b/timezone/iso3166.tab
index e20b5895e..0173c4011 100644
--- a/timezone/iso3166.tab
+++ b/timezone/iso3166.tab
@@ -1,23 +1,20 @@
 # ISO 3166 2-letter country codes
 #
-# @(#)iso3166.tab	1.6
+# @(#)iso3166.tab	1.7
 #
-# From Paul Eggert <eggert@twinsun.com> (1996-09-03):
+# From Paul Eggert <eggert@twinsun.com> (1999-10-13):
 #
 # This file contains a table with the following columns:
-# 1.  ISO 3166-1:1997 2-character country code.  See: 
+# 1.  ISO 3166-1:1999 2-character country code.  See:
+#	<a href="http://www.din.de/gremien/nas/nabd/iso3166ma/codlstp1.html">
+#	ISO 3166-1: The Code List
+#	</a>.
 # 2.  The usual English name for the country,
 #	chosen so that alphabetic sorting of subsets produces helpful lists.
 #	This is not the same as the English name in the ISO 3166 tables.
 #
-# The PS code below has been reserved for Palestine by the ISO;
-# however, the code is not yet officially assigned to Palestine.  Please see
-# <a href="ftp://ftp.informatik.uni-erlangen.de/pub/doc/ISO/ISO-3166-background">
-# Cord Wischhoefer, Country Code Elements for Palestine (1996-07-24)
-# </a>.
-#
 # Columns are separated by a single tab.
 # The table is sorted by country code.
 #
 # Lines beginning with `#' are comments.
 #
@@ -93,11 +90,10 @@ FI	Finland
 FJ	Fiji
 FK	Falkland Islands
 FM	Micronesia
 FO	Faeroe Islands
 FR	France
-FX	France, Metropolitan
 GA	Gabon
 GB	Britain (UK)
 GD	Grenada
 GE	Georgia
 GF	French Guiana
@@ -112,10 +108,11 @@ GR	Greece
 GS	South Georgia & the South Sandwich Islands
 GT	Guatemala
 GU	Guam
 GW	Guinea-Bissau
 GY	Guyana
+HK	Hong Kong
 HM	Heard Island & McDonald Islands
 HN	Honduras
 HR	Croatia
 HT	Haiti
 HU	Hungary
diff --git a/timezone/northamerica b/timezone/northamerica
index 6203adf8b..743e721dd 100644
--- a/timezone/northamerica
+++ b/timezone/northamerica
@@ -1,6 +1,6 @@
-# @(#)northamerica	7.47
+# @(#)northamerica	7.48
 # also includes Central America and the Caribbean
 
 # 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
 # tz@elsie.nci.nih.gov for general use in the future).
@@ -406,10 +406,20 @@ Zone America/Louisville	-5:43:02 -	LMT	1883 Nov 18 12:00
 			-6:00 Louisville C%sT	1961 Jul 23 2:00
 			-5:00	-	EST	1968
 			-5:00	US	E%sT	1974 Jan  6 2:00
 			-6:00	1:00	CDT	1974 Oct 27 2:00
 			-5:00	US	E%sT
+# Wayne County, Kentucky
+# From
+# <a href="http://frwebgate.access.gpo.gov/cgi-bin/getdoc.cgi?dbname=1999_register&docid=99-26945-filed">
+# Federal Register Doc. 99-26945
+# </a> (1999-10-14 08:45-04)
+# In response to a petition by the Wayne County, Kentucky, Fiscal Court,
+# the Department of Transportation (DOT) proposed to move Wayne County,
+# Kentucky, from the Central Time Zone to the Eastern Time Zone.... Now
+# the earliest date that the proposed change might take effect is
+# October 29, 2000.
 
 # Michigan
 #
 # From Bob Devine (1988-01-28):
 # Michigan didn't observe DST from 1968 to 1973.
@@ -480,14 +490,14 @@ Link	America/Phoenix		MST
 Link	Pacific/Honolulu	HST
 
 ################################################################################
 
 
-# From Paul Eggert <eggert@twinsun.com> (1996-11-22):
+# From Paul Eggert <eggert@twinsun.com> (1999-10-29):
 # A good source for time zone historical data outside the US is
-# Thomas G. Shanks, The International Atlas (4th edition),
-# San Diego: ACS Publications, Inc. (1995).
+# Thomas G. Shanks, The International Atlas (5th edition),
+# San Diego: ACS Publications, Inc. (1999).
 #
 # Gwillim Law <LAW@encmail.encompass.com> writes that a good source
 # for recent time zone data is the International Air Transport
 # Association's Standard Schedules Information Manual (IATA SSIM),
 # published semiannually.  Law sent in several helpful summaries
@@ -534,11 +544,11 @@ Link	Pacific/Honolulu	HST
 #	Y: du Yukon		Yukon
 #
 # From Paul Eggert <eggert@twinsun.com> (1994-11-22):
 # Alas, this sort of thing must be handled by localization software.
 
-# The data for Canada are all from Shanks (1991).
+# The data for Canada are all from Shanks.
 
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Canada	1918	only	-	Apr	14	2:00	1:00	D
 Rule	Canada	1918	only	-	Oct	31	2:00	0	S
@@ -680,11 +690,11 @@ Zone America/Glace_Bay	-3:59:48 -	LMT	1902 Jun 15
 # Ontario Time Act (1990, Chapter T.9)
 # </a>
 # says that Ontario east of 90W uses EST/EDT, and west of 90W uses CST/CDT.
 # Officially Atikokan is therefore on CST/CDT, and most likely this report
 # concerns a non-official time observed as a matter of local practice.
-# For what it's worth, Shanks (1995) says that Atikokan has agreed with
+# For what it's worth, Shanks says that Atikokan has agreed with
 # Rainy River ever since standard time was introduced.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Mont	1917	only	-	Mar	25	2:00	1:00	D
 Rule	Mont	1917	only	-	Apr	24	0:00	0	S
@@ -852,11 +862,11 @@ Zone America/Edmonton	-7:33:52 -	LMT	1906 Sep
 
 # British Columbia
 
 # From Paul Eggert (1996-06-12):
 # Shanks writes that since 1970 most of this region has been like Vancouver.
-# Dawswon Creek uses MST.  Much of east BC is like Edmonton.
+# Dawson Creek uses MST.  Much of east BC is like Edmonton.
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Vanc	1918	only	-	Apr	14	2:00	1:00	D
 Rule	Vanc	1918	only	-	Oct	31	2:00	0	S
 Rule	Vanc	1942	only	-	Feb	 9	2:00	1:00	D
@@ -875,13 +885,12 @@ Zone America/Dawson_Creek -8:00:56 -	LMT	1884
 			-7:00	-	MST
 
 
 # Northwest Territories, Nunavut, Yukon
 
-# From Paul Eggert (1996-10-07):
+# From Paul Eggert (1999-10-29):
 # Dawson switched to PST in 1973.  Inuvik switched to MST in 1979.
-# Shanks's table for Watson Lake is corrupted, so we have no data there.
 # Mathew Englander <mathew@io.org> (1996-10-07) gives the following refs:
 #	* 1967. Paragraph 28(34)(g) of the Interpretation Act, S.C. 1967-68,
 #	c. 7 defines Yukon standard time as UTC-9.  This is still valid;
 #	see Interpretation Act, R.S.C. 1985, c. I-21, s. 35(1).
 #	* C.O. 1973/214 switched Yukon to PST on 1973-10-28 00:00.
@@ -890,11 +899,11 @@ Zone America/Dawson_Creek -8:00:56 -	LMT	1884
 # Shanks says Yukon's 1973-10-28 switch was at 2:00; go with Englander.
 
 # From Rives McDow (1999-09-04):
 # Nunavut ... moved ... to incorporate the whole territory into one time zone.
 # <a href="http://www.nunatsiaq.com/nunavut/nvt90903_13.html">
-# The change announcement
+# Nunavut moves to single time zone Oct. 31
 # </a> 
 #
 # From Antoine Leca (1999-09-06):
 # We then need to create a new timezone for the Kitikmeot region of Nunavut
 # to differentiate it from the Yellowknife region.
@@ -995,14 +1004,10 @@ Zone America/Dawson	-9:17:40 -	LMT	1900 Aug 20
 # April 3 fell on a Sunday in 1988; October 29 fell on a Sunday in 1989.  Ahem.
 # USNO claims there should be four Mexican zones rather than three:
 # a zone that's GMT-8 with DST; a zone that's always GMT-7;
 # a zone that's GMT-6 with DST; and a zone that's always GMT-6.
 
-# From Paul Eggert <eggert@twinsun.com> (1993-11-18):
-# Shanks also says there are four zones, but disagrees about the fourth.
-# Instead of GMT-6 with DST, he says there's GMT-8 without DST.
-
 # From Alan Perry <alan.perry@eng.sun.com> (1996-02-15):
 # A guy from our Mexico subsidiary finally found the Presidential Decree
 # outlining the timezone changes in Mexico.
 # 
 # ------------- Begin Forwarded Message -------------
@@ -1037,11 +1042,11 @@ Zone America/Dawson	-9:17:40 -	LMT	1900 Aug 20
 
 # From Rives McDow (1998-10-08):
 # The State of Quintana Roo has reverted back to central STD and DST times
 # (i.e. UTC -0600 and -0500 as of 1998-08-02).
 
-# From Shanks (1991):
+# From Shanks:
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Mexico	1939	only	-	Feb	5	0:00	1:00	D
 Rule	Mexico	1939	only	-	Jun	25	0:00	0	S
 Rule	Mexico	1940	only	-	Dec	9	0:00	1:00	D
 Rule	Mexico	1941	only	-	Apr	1	0:00	0	S
@@ -1050,16 +1055,15 @@ Rule	Mexico	1944	only	-	May	1	0:00	0	S
 Rule	Mexico	1950	only	-	Feb	12	0:00	1:00	D
 Rule	Mexico	1950	only	-	Jul	30	0:00	0	S
 Rule	Mexico	1996	max	-	Apr	Sun>=1	2:00	1:00	D
 Rule	Mexico	1996	max	-	Oct	lastSun	2:00	0	S
 #
-Rule	BajaN	1950	1966	-	Apr	lastSun	2:00	1:00	D
-Rule	BajaN	1950	1961	-	Sep	lastSun	2:00	0	S
-Rule	BajaN	1961	1966	-	Oct	lastSun	2:00	0	S
+Rule	BajaN	1954	1961	-	Apr	lastSun	2:00	1:00	D
+Rule	BajaN	1954	1961	-	Sep	lastSun	2:00	0	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 # Quintana Roo
-Zone America/Cancun	-5:47:04 -	LMT	1922 Jan  1  1:12:42
+Zone America/Cancun	-5:47:04 -	LMT	1922 Jan  1  0:12:56
 			-6:00	-	CST	1996
 			-6:00	Mexico	C%sT	1997 Oct lastSun 2:00
 			-5:00	Mexico	E%sT	1998 Aug  2  2:00
 			-6:00	Mexico	C%sT
 # Central Mexico
@@ -1069,11 +1073,11 @@ Zone America/Mexico_City -6:36:36 -	LMT	1922 Jan  1  0:23:24
 			-7:00	-	MST	1931 May  1 23:00
 			-6:00	-	CST	1931 Oct
 			-7:00	-	MST	1932 Mar 30 23:00
 			-6:00	Mexico	C%sT
 # Chihuahua
-Zone America/Chihuahua	-7:04:20 -	LMT	1921 Dec 31 23:55:44
+Zone America/Chihuahua	-7:04:20 -	LMT	1921 Dec 31 23:55:40
 			-7:00	-	MST	1927 Jun 10 23:00
 			-6:00	-	CST	1930 Nov 15
 			-7:00	-	MST	1931 May  1 23:00
 			-6:00	-	CST	1931 Oct
 			-7:00	-	MST	1932 Mar 30 23:00
@@ -1090,27 +1094,19 @@ Zone America/Mazatlan	-7:05:40 -	LMT	1921 Dec 31 23:54:20
 			-7:00	-	MST	1932 Mar 30 23:00
 			-6:00	-	CST	1942 Apr
 			-7:00	-	MST	1949 Jan 14
 			-8:00	-	PST	1970
 			-7:00	Mexico	M%sT
-# N Baja California
+# Baja California
 Zone America/Tijuana	-7:48:04 -	LMT	1922 Jan  1  0:11:56
 			-8:00	-	PST	1927 Jun 10 23:00
 			-7:00	-	MST	1930 Nov 16
 			-8:00	-	PST	1942 Apr
 			-7:00	-	MST	1949 Jan 14
-			-8:00	BajaN	P%sT	1967 Apr lastSun 2:00
+			-8:00	BajaN	P%sT	1976
 			-8:00	US	P%sT	1996
 			-8:00	Mexico	P%sT
-# Baja California
-Zone America/Ensenada	-7:46:28 -	LMT	1922 Jan  1  0:13:32
-			-8:00	-	PST	1927 Jun 10 23:00
-			-7:00	-	MST	1930 Nov 16
-			-8:00	-	PST	1942 Apr
-			-7:00	-	MST	1949 Jan 14
-			-8:00	-	PST	1996
-			-8:00	Mexico	P%sT
 #
 # Revillagigedo Is
 # no information
 
 ###############################################################################
@@ -1171,23 +1167,21 @@ Zone Atlantic/Bermuda	-4:19:04 -	LMT	1930 Jan  1 2:00    # Hamilton
 Zone	America/Cayman	-5:25:32 -	LMT	1890		# Georgetown
 			-5:07:12 -	KMT	1912 Feb    # Kingston Mean Time
 			-5:00	-	EST
 
 # Costa Rica
-# Shanks gives some very odd dates for 1991, and stops there.
-# For now, we won't guess further.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	CR	1979	1980	-	Feb	lastSun	0:00	1:00	D
 Rule	CR	1979	1980	-	Jun	Sun>=1	0:00	0	S
 Rule	CR	1991	1992	-	Jan	Sat>=15	0:00	1:00	D
 # IATA SSIM (1991-09) says the following was at 1:00; go with Shanks.
 Rule	CR	1991	only	-	Jul	 1	0:00	0	S
 Rule	CR	1992	only	-	Mar	15	0:00	0	S
 # There are too many San Joses elsewhere, so we'll use `Costa Rica'.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Costa_Rica	-5:36:20 -	LMT	1890		# San Jose
-			-5:36	-	SJMT	1921 Jan 15 # San Jose Mean Time
+			-5:36:20 -	SJMT	1921 Jan 15 # San Jose Mean Time
 			-6:00	CR	C%sT
 # Coco
 # no information; probably like America/Costa_Rica
 
 # Cuba
@@ -1234,11 +1228,11 @@ Rule	Cuba	1998	1999	-	Mar	lastSun	0:00s	1:00	D
 Rule	Cuba	1998	max	-	Oct	lastSun	0:00s	0	S
 Rule	Cuba	2000	max	-	Apr	 1	0:00s	1:00	D
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	America/Havana	-5:29:28 -	LMT	1890
-			-5:30	-	HMT	1925 Jul 19 12:00 # Havana MT
+			-5:29:36 -	HMT	1925 Jul 19 12:00 # Havana MT
 			-5:00	Cuba	C%sT
 
 # Dominica
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Dominica	-4:05:36 -	LMT	1911 Jul 1 0:01		# Roseau
@@ -1292,11 +1286,11 @@ Zone America/Guatemala	-6:02:04 -	LMT	1918 Oct 5
 # Haiti
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Haiti	1983	only	-	May	8	0:00	1:00	D
 Rule	Haiti	1984	1987	-	Apr	lastSun	0:00	1:00	D
 Rule	Haiti	1983	1987	-	Oct	lastSun	0:00	0	S
-# Shanks says AT is 2:00, but IATA SSIM (1991/1996) says 1:00s.  Go with IATA.
+# Shanks says AT is 2:00, but IATA SSIM (1991/1997) says 1:00s.  Go with IATA.
 Rule	Haiti	1988	1997	-	Apr	Sun>=1	1:00s	1:00	D
 Rule	Haiti	1988	1997	-	Oct	lastSun	1:00s	0	S
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Port-au-Prince -4:49:20 -	LMT	1890
 			-4:49	-	PPMT	1917 Jan 24 12:00 # P-a-P MT
@@ -1316,15 +1310,15 @@ Zone America/Tegucigalpa -5:48:52 -	LMT	1921 Apr
 # Follows US rules.
 
 # From U. S. Naval Observatory (1989-01-19):
 # JAMAICA             5 H  BEHIND UTC
 
-# From Shanks (1991):
+# From Shanks:
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	America/Jamaica	-5:07:12 -	LMT	1890		# Kingston
 			-5:07:12 -	KMT	1912 Feb    # Kingston Mean Time
-			-5:00	-	EST	1974 Jan 6 2:00
+			-5:00	-	EST	1974 Apr 28 2:00
 			-5:00	US	E%sT	1984
 			-5:00	-	EST
 
 # Martinique
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
diff --git a/timezone/southamerica b/timezone/southamerica
index 25446807a..bb95d0d70 100644
--- a/timezone/southamerica
+++ b/timezone/southamerica
@@ -1,15 +1,15 @@
-# @(#)southamerica	7.31
+# @(#)southamerica	7.32
 
 # 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
 # tz@elsie.nci.nih.gov for general use in the future).
 
 # From Paul Eggert <eggert@twinsun.com> (1999-07-07):
 # A good source for time zone historical data outside the U.S. is
-# Thomas G. Shanks, The International Atlas (4th edition),
-# San Diego: ACS Publications, Inc. (1995).
+# Thomas G. Shanks, The International Atlas (5th edition),
+# San Diego: ACS Publications, Inc. (1999).
 #
 # Gwillim Law <LAW@encmail.encompass.com> writes that a good source
 # for recent time zone data is the International Air Transport
 # Association's Standard Schedules Information Manual (IATA SSIM),
 # published semiannually.  Law sent in several helpful summaries
@@ -97,11 +97,11 @@ Rule	Arg	1988	only	-	Dec	 1	0:00	1:00	S
 # These corrections were contributed by InterSoft Argentina S.A.,
 # obtaining the data from the:
 # Talleres de Hidrografia Naval Argentina
 # (Argentine Naval Hydrography Institute)
 #
-# Shanks gives 1989 Mar 16 and stops after 1990 Mar 4; go with Otero.
+# Shanks stops after 1992-03-01; go with Otero.
 Rule	Arg	1989	1993	-	Mar	Sun>=1	0:00	0	-
 Rule	Arg	1989	1992	-	Oct	Sun>=15	0:00	1:00	S
 #
 # From Hernan G. Otero <hernan@isoft.com.ar> (1995-06-26):
 # From this moment on, the law that mandated the daylight saving
@@ -214,42 +214,20 @@ Zone	America/La_Paz	-4:32:36 -	LMT	1890
 # airport it gives a time zone which is coded to the SSIM.  From that
 # information, I'm led to conclude that the states of Amapa (AP), Ceara (CE),
 # Maranhao (MA), Paraiba (PR), Pernambuco (PE), Piaui (PI), and Rio Grande do
 # Norte (RN), and the eastern part of Para (PA) are all in BR1 without DST.
 
-# From Paul Eggert (1996-11-22):
-# Let's make the following assumptions:
-#
-# * All data in Shanks are correct through 1990.  In particular,
-#   Shanks was right when he said Acre stopped observing DST in mid-1988.
-# * Areas where Shanks reports DST up to 1990, but the IATA reports no DST
-#   in 1995, stopped observing DST in mid-1990.
-#
-# Under these assumptions Brazil needs 7 entries to cover all the distinct
-# time zone histories since 1970:
-#
-# Noronha (UTC-2), Fortaleza (UTC-3), and Manaus (UTC-4) stopped observing DST
-#	in mid-1990.
-# Maceio (UTC-3) stopped observing DST in mid-1990, but started again mid-1995.
-# Sao Paulo (UTC-3) and Cuiaba (UTC-4) always observed DST.
-# Porto Acre (UTC-5) stopped observing DST in mid-1988.
-
-# From Rodrigo Feher <feher@pobox.com> (1998-01-17):
-# Reading "southamerica" file in timezone 7.55 I've found an
-# error. Line 193 say "Territory of Acre". It is not a territory anymore
-# but a state.
-
 # From Marcos Tadeu (1998-09-27):
 # <a href="http://pcdsh01.on.br/verao1.html">
 # Brazilian official page
 # </a>
 #
-# From Paul Eggert (1998-09-28):
+# From Paul Eggert (1998-10-29):
 # The official decrees referenced below are taken from
 # <a href="http://pcdsh01.on.br/DecHV.html">
 # Decretos sobre o Horario de Verao no Brasil
-# </a> (1998-09-25, in Portuguese).
+# </a> (1999-10-04, in Portuguese).
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Decree <a href="http://pcdsh01.on.br/HV20466.htm">20,466</a> (1931-10-01)
 # Decree <a href="http://pcdsh01.on.br/HV21896.htm">21,896</a> (1932-01-10)
 Rule	Brazil	1931	only	-	Oct	 3	11:00	1:00	S
@@ -353,76 +331,86 @@ Rule	Brazil	1998	only	-	Mar	 1	 0:00	0	-
 # Decree <a href="http://pcdsh01.on.br/figuras/Hv98.jpg">2,780</a> (1998-09-11)
 # adopted by the same states as before.
 Rule	Brazil	1998	only	-	Oct	11	 0:00	1:00	S
 Rule	Brazil	1999	only	-	Feb	21	 0:00	0	-
 # Decree <a href="http://pcdsh01.on.br/figuras/HV3150.gif">3,150</a>
-# (1999-08-23), adopted by same states, says only 1999-10-03 and 2000-02-27;
-# after that, these rules are guesses and are quite possibly wrong,
-# but they are more likely than no DST at all.
+# (1999-08-23) adopted by same states.
+# Decree <a href="http://pcdsh01.on.br/DecHV99.gif">3,188</a> (1999-09-30)
+# adds SE, AL, PE, PR, RN, CE, PI, MA and RR.
+# These give only one year's rules.  After that, the rules are guesses
+# and are quite possibly wrong, but are more likely than no DST at all.
 Rule	Brazil	1999	max	-	Oct	Sun>=1	 0:00	1:00	S
 Rule	Brazil	2000	max	-	Feb	lastSun	 0:00	0	-
 
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 #
 # Fernando de Noronha
 Zone America/Noronha	-2:09:40 -	LMT	1914
-			-2:00	Brazil	FN%sT	1990 Jul
+			-2:00	Brazil	FN%sT	1990 Sep 17
 			-2:00	-	FNT
 #
-# Amapa, east Para
+# Amapa (AP), east Para (PA)
 Zone America/Belem	-3:13:56 -	LMT	1914
-			-3:00	Brazil	BR%sT	1988 Jul
+			-3:00	Brazil	BR%sT	1988 Sep 12
 			-3:00	-	BRT
 #
-# Maranhao, Piaui, Ceara, Rio Grande do Norte, Paraiba,
-# Pernambuco (except Fernando de Noronha)
+# Maranhao (MA), Piaui (PI), Ceara (CE), Rio Grande do Norte (RN),
+# Paraiba (PB), Pernambuco (PE) (except Fernando de Noronha)
 Zone America/Fortaleza	-2:34:00 -	LMT	1914
-			-3:00	Brazil	BR%sT	1990 Jul
-			-3:00	-	BRT
+			-3:00	Brazil	BR%sT	1990 Sep 17
+			-3:00	-	BRT	1999 Sep 30
+			-3:00	Brazil	BR%sT
 #
-# Tocantins
+# Tocantins (TO)
 Zone America/Araguaina	-3:12:48 -	LMT	1914
-			-3:00	Brazil	BR%sT	1990 Jul
-			-3:00	-	BRT	1995 Jul
+			-3:00	Brazil	BR%sT	1990 Sep 17
+			-3:00	-	BRT	1995 Sep 14
 			-3:00	Brazil	BR%sT
 #
-# Alagoas, Sergipe
+# Alagoas (AL), Sergipe (SE)
 Zone America/Maceio	-2:22:52 -	LMT	1914
-			-3:00	Brazil	BR%sT	1990 Jul
-			-3:00	-	BRT	1995 Jul
-			-3:00	Brazil	BR%sT	1996 Jul
-			-3:00	-	BRT
+			-3:00	Brazil	BR%sT	1990 Sep 17
+			-3:00	-	BRT	1995 Oct 13
+			-3:00	Brazil	BR%sT	1996 Sep  4
+			-3:00	-	BRT	1999 Sep 30
+			-3:00	Brazil	BR%sT
 #
-# Bahia, Goias, Distrito Federal, Minas Gerais, Espirito Santo, Rio de Janeiro,
-# Sao Paulo, Parana, Santa Catarina, Rio Grande do Sul
+# Bahia (BA), Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
+# Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),
+# Santa Catarina (SC), Rio Grande do Sul (RS)
 Zone America/Sao_Paulo	-3:06:28 -	LMT	1914
 			-3:00	Brazil	BR%sT	1963 Oct 23 00:00
-			-3:00	-	BRST	1964
+			-3:00	1:00	BRST	1964
 			-3:00	Brazil	BR%sT
 #
 # Mato Grosso, Mato Grosso do Sul
 Zone America/Cuiaba	-3:44:20 -	LMT	1914
-			-4:00	Brazil	AM%sT	1990 Jul
-			-4:00	-	AMT
+			-4:00	Brazil	AM%sT
 #
-# Roraima, west Para, Rondonia
+# west Para (PA), Rondonia (RO)
 Zone America/Porto_Velho -4:15:36 -	LMT	1914
-			-4:00	Brazil	AM%sT	1988 Jul
+			-4:00	Brazil	AM%sT	1988 Sep 12
 			-4:00	-	AMT
 #
-# Amazonas
+# Roraima (RR)
+Zone America/Boa_Vista	-4:02:40 -	LMT	1914
+			-4:00	Brazil	AM%sT	1988 Sep 12
+			-4:00	-	AMT	1999 Sep 30
+			-4:00	Brazil	AM%sT
+#
+# Amazonas (AM)
 Zone America/Manaus	-4:00:04 -	LMT	1914
-			-4:00	Brazil	AM%sT	1988 Jul
-			-4:00	-	AMT	1993 Jul
-			-4:00	Brazil	AM%sT	1994 Jul
+			-4:00	Brazil	AM%sT	1988 Sep 12
+			-4:00	-	AMT	1993 Sep 28
+			-4:00	Brazil	AM%sT	1994 Sep 22
 			-4:00	-	AMT
 #
-# Acre
+# Acre (AC)
 # Rio_Branco is too ambiguous, since there's a Rio Branco in Uruguay too.
 Zone America/Porto_Acre	-4:31:12 -	LMT	1914
-			-5:00	Brazil	AC%sT	1988 Jul
+			-5:00	Brazil	AC%sT	1988 Sep 12
 			-5:00	-	ACT
 #
 # Martin Vaz and Trinidade are like America/Noronha.
 
 
@@ -450,11 +438,11 @@ Rule	Chile	1970	1998	-	Mar	Sun>=9	0:00	0	-
 Rule	Chile	1998	only	-	Sep	27	0:00	1:00	S
 Rule	Chile	1999	only	-	Apr	 4	0:00	0	-
 Rule	Chile	1999	max	-	Oct	Sun>=9	0:00	1:00	S
 Rule	Chile	2000	max	-	Mar	Sun>=9	0:00	0	-
 # IATA SSIM anomalies: (1990-09) says 1990-09-16; (1992-02) says 1992-03-14;
-# (1996-09) says 1998-03-08.  Ignore these for now.
+# (1996-09) says 1998-03-08.  Ignore these.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Santiago	-4:42:40 -	LMT	1890
 			-4:42:40 -	SMT	1910	    # Santiago Mean Time
 			-5:00	Chile	CL%sT	1932 Sep    # Chile Time
 			-4:00	Chile	CL%sT
@@ -467,23 +455,24 @@ Zone Pacific/Easter	-7:17:28 -	LMT	1890	    # Mataveri
 # San Ambrosio, San Felix
 # no information; probably like America/Santiago
 
 
 # Colombia
+# Shanks specifies 24:00 for 1992 transition times; go with IATA,
+# as it seems implausible to change clocks at midnight New Year's Eve.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	CO	1992	only	-	May	 2	0:00	1:00	S
-# Shanks (1995) estimates 1993-04-03 24:00 for this; go with IATA.
 Rule	CO	1992	only	-	Dec	31	0:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	America/Bogota	-4:56:20 -	LMT	1884 Mar 13
 			-4:56:20 -	BMT	1914 Nov 23 # Bogota Mean Time
 			-5:00	CO	CO%sT	# Colombia Time
 # Malpelo, Providencia, San Andres
 # no information; probably like America/Bogota
 
 # Curacao
-# Shanks (1995) says that Bottom and Oranjestad have been at -4:00 since
+# Shanks says that Bottom and Oranjestad have been at -4:00 since
 # standard time was introduced on 1912-03-02; and that Kralendijk and Rincon
 # used Kralendijk Mean Time (-4:33:08) from 1912-02-02 to 1965-01-01.
 # This all predates our 1970 cutoff, though.
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	America/Curacao	-4:35:44 -	LMT	1912 Feb 12	# Willemstad
@@ -533,37 +522,33 @@ Zone	America/Guyana	-3:52:40 -	LMT	1915 Mar	# Georgetown
 			-3:00	-	GYT	1991
 # IATA SSIM (1996-06) says -4:00.  Assume a 1991 switch.
 			-4:00	-	GYT
 
 # Paraguay
-
-# From Bob Devine (1988-01-28):
-# Paraguay: First day in October to last in March.  Midnight switch??
-# Since 1980.
-
-# From U. S. Naval Observatory (1989-01-19):
-# PARAGUAY            4 H  BEHIND UTC
-# PARAGUAY            3 H  BEHIND UTC    OCT 1, '88-MAR 31, '89
-
-# From Shanks (1991):
+# From Paul Eggert (1999-10-29):
+# Shanks (1999) says that spring transitions are from 01:00 -> 02:00,
+# and autumn transitions are from 00:00 -> 23:00.  Go with earlier
+# editions of Shanks, and with the IATA, who say transitions occur at 00:00.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
-Rule	Para	1975	1978	-	Oct	 1	0:00	1:00	S
+Rule	Para	1975	1988	-	Oct	 1	0:00	1:00	S
 Rule	Para	1975	1978	-	Mar	 1	0:00	0	-
-# Shanks says 1979 was all DST.
-Rule	Para	1980	1991	-	Apr	 1	0:00	0	-
-Rule	Para	1980	1988	-	Oct	 1	0:00	1:00	S
+Rule	Para	1979	1991	-	Apr	 1	0:00	0	-
 Rule	Para	1989	only	-	Oct	22	0:00	1:00	S
 Rule	Para	1990	only	-	Oct	 1	0:00	1:00	S
 Rule	Para	1991	only	-	Oct	 6	0:00	1:00	S
 Rule	Para	1992	only	-	Mar	 1	0:00	0	-
 Rule	Para	1992	only	-	Oct	 5	0:00	1:00	S
 Rule	Para	1993	only	-	Mar	31	0:00	0	-
 Rule	Para	1993	1995	-	Oct	 1	0:00	1:00	S
 Rule	Para	1994	1995	-	Feb	lastSun	0:00	0	-
-Rule	Para	1996	1998	-	Mar	 1	0:00	0	-
+Rule	Para	1996	only	-	Mar	 1	0:00	0	-
+# IATA SSIM (1997-09) says Mar 1; go with Shanks.
+Rule	Para	1997	only	-	Feb	lastSun	0:00	0	-
+Rule	Para	1998	only	-	Mar	 1	0:00	0	-
 Rule	Para	1996	max	-	Oct	Sun>=1	0:00	1:00	S
-Rule	Para	1999	max	-	Feb	lastSat	0:00	0	-
+# IATA SSIM (1999-02) says lastSat, not lastSun; go with Shanks.
+Rule	Para	1999	max	-	Feb	lastSun	0:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone America/Asuncion	-3:50:40 -	LMT	1890
 			-3:50:40 -	AMT	1931 Oct 10 # Asuncion Mean Time
 			-4:00	-	PYT	1972 Oct # Paraguay Time
 			-3:00	-	PYT	1974 Apr
@@ -609,11 +594,11 @@ Zone America/Port_of_Spain -4:06:04 -	LMT	1912 Mar 2
 			-4:00	-	AST
 
 # Uruguay
 # From Paul Eggert <eggert@twinsun.com> (1993-11-18):
 # Uruguay wins the prize for the strangest peacetime manipulation of the rules.
-# From Shanks (1991):
+# From Shanks:
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 # Whitman gives 1923 Oct 1; go with Shanks.
 Rule	Uruguay	1923	only	-	Oct	 2	 0:00	0:30	HS
 Rule	Uruguay	1924	1926	-	Apr	 1	 0:00	0	-
 Rule	Uruguay	1924	1925	-	Oct	 1	 0:00	0:30	HS
@@ -651,14 +636,14 @@ Rule	Uruguay	1980	only	-	May	 1	 0:00	0	-
 Rule	Uruguay	1987	only	-	Dec	14	 0:00	1:00	S
 Rule	Uruguay	1988	only	-	Mar	14	 0:00	0	-
 Rule	Uruguay	1988	only	-	Dec	11	 0:00	1:00	S
 Rule	Uruguay	1989	only	-	Mar	12	 0:00	0	-
 Rule	Uruguay	1989	only	-	Oct	29	 0:00	1:00	S
+# Shanks says no DST was observed in 1990/1 and 1991/2,
+# and that 1992/3's DST was from 10-25 to 03-01.  Go with IATA.
 Rule	Uruguay	1990	1992	-	Mar	Sun>=1	 0:00	0	-
 Rule	Uruguay	1990	1991	-	Oct	Sun>=21	 0:00	1:00	S
-# Shanks's 4th edition (1995) says no DST was observed in 1990/1 and 1991/2,
-# and that 1992/3's DST was from 10-25 to 03-01.  Go with IATA.
 Rule	Uruguay	1992	only	-	Oct	18	 0:00	1:00	S
 Rule	Uruguay	1993	only	-	Feb	28	 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/zone.tab b/timezone/zone.tab
index 79257a176..b5f67e99e 100644
--- a/timezone/zone.tab
+++ b/timezone/zone.tab
@@ -1,6 +1,6 @@
-# @(#)zone.tab	1.15
+# @(#)zone.tab	1.16
 #
 # TZ zone descriptions
 #
 # From Paul Eggert <eggert@twinsun.com> (1996-08-05):
 #
@@ -76,11 +76,12 @@ BR	-0127-04829	America/Belem	Amapa, E Para
 BR	-0343-03830	America/Fortaleza	NE Brazil (MA, PI, CE, RN, PR, PE)
 BR	-0712-04812	America/Araguaina	Tocantins
 BR	-0940-03543	America/Maceio	Alagoas, Sergipe
 BR	-2332-04637	America/Sao_Paulo	S & SE Brazil (BA, GO, DF, MG, ES, RJ, SP, PR, SC, RS)
 BR	-1535-05605	America/Cuiaba	Mato Grosso, Mato Grosso do Sul
-BR	-0846-06354	America/Porto_Velho	W Para, Rondonia, Roraima
+BR	-0846-06354	America/Porto_Velho	W Para, Rondonia
+BR	+0249-06040	America/Boa_Vista	Roraima
 BR	-0308-06001	America/Manaus	Amazonas
 BR	-0934-06731	America/Porto_Acre	Acre
 BS	+2505-07721	America/Nassau
 BT	+2728+08939	Asia/Thimbu
 BW	-2545+02555	Africa/Gaborone
@@ -119,11 +120,10 @@ CK	-2114-15946	Pacific/Rarotonga
 CL	-3327-07040	America/Santiago	mainland
 CL	-2710-10927	Pacific/Easter	Easter Island
 CM	+0403+00942	Africa/Douala
 CN	+4545+12641	Asia/Harbin	north Manchuria
 CN	+3114+12128	Asia/Shanghai	China coast
-CN	+2217+11409	Asia/Hong_Kong	Hong Kong
 CN	+2934+10635	Asia/Chungking	China mountains
 CN	+4348+08735	Asia/Urumqi	Tibet & Xinjiang
 CN	+3929+07559	Asia/Kashgar	Eastern Turkestan
 CO	+0436-07405	America/Bogota
 CR	+0956-08405	America/Costa_Rica
@@ -176,10 +176,11 @@ GR	+3758+02343	Europe/Athens
 GS	-5416-03632	Atlantic/South_Georgia
 GT	+1438-09031	America/Guatemala
 GU	+1328+14445	Pacific/Guam
 GW	+1151-01535	Africa/Bissau
 GY	+0648-05810	America/Guyana
+HK	+2217+11409	Asia/Hong_Kong
 HN	+1406-08713	America/Tegucigalpa
 HR	+4548+01558	Europe/Zagreb
 HT	+1832-07220	America/Port-au-Prince
 HU	+4730+01905	Europe/Budapest
 ID	-0610+10648	Asia/Jakarta	Java & Sumatra
@@ -240,16 +241,15 @@ MR	+1806-01557	Africa/Nouakchott
 MS	+1644-06213	America/Montserrat
 MT	+3554+01431	Europe/Malta
 MU	-2010+05730	Indian/Mauritius
 MV	+0410+07330	Indian/Maldives
 MW	-1547+03500	Africa/Blantyre
-MX	+2105-08646	America/Cancun	Eastern Time
-MX	+1924-09909	America/Mexico_City	Central Time
+MX	+1924-09909	America/Mexico_City	Central Time - most locations
+MX	+2105-08646	America/Cancun	Central Time - Quintana Roo
 MX	+2313-10625	America/Mazatlan	Mountain Time - most locations
 MX	+2838-10605	America/Chihuahua	Mountain Time - Chihuahua
-MX	+3152-11637	America/Ensenada	Pacific Time - most locations
-MX	+3232-11701	America/Tijuana	Pacific Time - north Baja California
+MX	+3232-11701	America/Tijuana	Pacific Time
 MY	+0310+10142	Asia/Kuala_Lumpur	peninsular Malaysia
 MY	+0133+11020	Asia/Kuching	Sabah & Sarawak
 MZ	-2558+03235	Africa/Maputo
 NA	-2234+01706	Africa/Windhoek
 NC	-2216+16530	Pacific/Noumea
@@ -328,10 +328,11 @@ TH	+1345+10031	Asia/Bangkok
 TJ	+3835+06848	Asia/Dushanbe
 TK	-0922-17114	Pacific/Fakaofo
 TM	+3757+05823	Asia/Ashkhabad
 TN	+3648+01011	Africa/Tunis
 TO	-2110+17510	Pacific/Tongatapu
+TP	-0833+12535	Asia/Dili
 TR	+4101+02858	Europe/Istanbul
 TT	+1039-06131	America/Port_of_Spain
 TV	-0831+17913	Pacific/Funafuti
 TW	+2503+12130	Asia/Taipei
 TZ	-0648+03917	Africa/Dar_es_Salaam

Vulnerable code:       /* $ORIGIN is not expanded for SUID/GUID programs.  */
      if ((((!__libc_enable_secure
	     && strncmp (&name[1], "ORIGIN", 6) == 0 && (len = 7) != 0)
	    || (strncmp (&name[1], "PLATFORM", 8) == 0 && (len = 9) != 0))
	      && ((!__libc_enable_secure
		   && strncmp (&name[2], "ORIGIN}", 7) == 0 && (len = 9) != 0)
	  if ((((strncmp (&name[1], "ORIGIN", 6) == 0 && (len = 7) != 0)
		|| (strncmp (&name[1], "PLATFORM", 8) == 0 && (len = 9) != 0))
		      ? (__libc_enable_secure ? NULL : l->l_origin)
  /* Determine the nubmer of DST elements.  */
and the data if this tree node is returned by the function.  If there is
no matching entry in the tree nothing can be deleted and the function
returns @code{NULL}.
		++v;
		v->iov_base = (char *) "\n";
		v->iov_len = 1;
		(void)__writev(STDERR_FILENO, iov, 2);
		   tst-preadwrite test-vfork regexbug1
/* How many characters in the character set.  */
# define CHAR_SET_SIZE 256

# ifdef SYNTAX_TABLE

extern char *re_syntax_table;

# else /* not SYNTAX_TABLE */

static char re_syntax_table[CHAR_SET_SIZE];

static void
init_syntax_once ()
{
   register int c;
   static int done;

   if (done)
     return;

   bzero (re_syntax_table, sizeof re_syntax_table);

   for (c = 'a'; c <= 'z'; c++)
     re_syntax_table[c] = Sword;

   for (c = 'A'; c <= 'Z'; c++)
     re_syntax_table[c] = Sword;

   for (c = '0'; c <= '9'; c++)
     re_syntax_table[c] = Sword;

   re_syntax_table['_'] = Sword;

   done = 1;
}

# endif /* not SYNTAX_TABLE */

# define SYNTAX(c) re_syntax_table[c]

  {
    int d = __open ("/dev/tty", 0);
    if (d < 0)
      return errno;
    result = __ttyname_r (d, real_tty_path, sizeof (tty_pathname));
    (void) __close (d);

    if (result != 0)
      {
	__set_errno (result);
	return result;
      }
  }
      size_t needed = strlen (ut->ut_line) + 1;
      if (needed < name_len)
	  memcpy (name, ut->ut_line, needed);
# @(#)africa	7.31
# Thomas G. Shanks, The International Atlas (4th edition),
# San Diego: ACS Publications, Inc. (1995).
#
# From Shanks, as corrected by Whitman:
Rule	Libya	1990	only	-	May	 4	0:00	1:00	S
Rule	Libya	1996	only	-	Mar	30	2:00s	1:00	S
Rule	Libya	1996	only	-	Sep	30	2:00s	0	-
Rule	Libya	1997	only	-	Apr	 4	0:00	1:00	S
Rule	Libya	1997	only	-	Oct	 4	0:00	0	-
			1:00	Libya	CE%sT	1991
			2:00	-	EET	1996 Mar 30 3:00
			1:00	Libya	CE%sT	1997 Oct  4 0:00
# Shanks says DST transitions are at 0:00; go with IATA.
# From Paul Eggert (1997-10-05):
# Shanks says St Helena was 1W26 (-0:05:44) from 1890 to 1951,
# but this is most likely a typo for 5W42, the longitude of Jamestown.
# Shanks erroneously claims that most of South Africa switched to 1:00
# on 1994-04-03 at 00:00.
#
# @(#)asia	7.48
# Thomas G. Shanks, The International Atlas (4th edition),
# San Diego: ACS Publications, Inc. (1995).
# Except where otherwise noted, it is the source for the data below.
# From Paul Eggert (1999-09-27):
# but usno1995 has Armenia at 4:00 (with DST), and Edgar Der-Danieliantz
# What a mess!  We guess Yerevan DST stayed in sync with Moscow between 1990
# and 1995, did not use DST in 1996, and started using DST again in 1997.
			3:00	1:00	AMST	1991 Sep 29 2:00s # Armenia Time
			3:00	-	AMT	1992 Jan 19 2:00s
			4:00 RussiaAsia	AM%sT	1996
# From Shanks (1995):
# Shanks (1995) writes that Taiwan observed DST during 1945, when it
			7:07:12	-	JMT	1924 Jan  1 0:13 # Jakarta MT
# From Shanks (1995):
Rule	Kirgiz	1991	1996	-	Sep	lastSun	0:00	0	-
			5:00	1:00	FRUST	1991 Aug 31 # independence
# From Shanks (1995):
# </a>
Rule	Mongol	1996	only	-	Oct	Fri>=22	0:00	0	-
# Transitions before 1996 are from Shanks (1995).
# IATA SSIM (1996-09) says 1997-03-31; (1998-02) says 1998-04-02;
# 2000-04-02, and 2001-04-02; ignore all these claims for now.
Rule	Syria	1994	max	-	Apr	 1	0:00	1:00	S
# From Shanks (1995), who writes ``date of change uncertain'' for 1991.
			5:00	1:00	DUSST	1991 Sep  9 # independence
			5:00 RussiaAsia	TJ%sT	1992
# From Shanks (1995):
			5:00	-	ASHT	1981 Apr  1
			5:00	1:00	ASHST	1981 Oct  1
			6:00	-	ASHT	1982 Apr  1
			5:00 RussiaAsia	ASH%sT	1991
			5:00	-	ASHT	1991 Oct 27 # independence
			5:00 RussiaAsia	TM%sT	1993	# Turkmenistan Time
# From Shanks (1995):
			5:00	-	TAST	1991 Sep  1 # independence
			5:00	-	UZT	1992
			5:00	-	TAST	1991 Sep  1 # independence
			5:00	-	UZT	1992
# From Shanks (1991):
# @(#)australasia	7.51
# Shanks gives 1917 Jan 1 0:01; go with Whitman (and guess 2:00).
Rule	Aus	1916	only	-	Oct	 1	2:00	1:00	-
			 9:30	-	CST	1917 Jan 1 0:01
			 8:00	-	WST	1917 Jan 1 0:01
			10:00	-	EST	1917 Jan 1 0:01
			10:00	-	EST	1917 Jan 1 0:01
			9:30	-	CST	1917 Jan 1 0:01
Rule	AT	1991	max	-	Oct	Sun>=1	2:00s	1:00	-
			10:00	-	EST	1917 Jan 1 0:01
			10:00	-	EST	1917 Jan 1 0:01
			10:00	-	EST	1917 Jan 1 0:01
			9:30	-	CST	1917 Jan 1 0:01
Rule	LH	1986	1989	-	Mar	Sun>=15	2:00s	0	-
Rule	LH	1990	1995	-	Mar	Sun>=1	2:00s	0	-
# From Shanks (1995):
			11:00	-	PONT	1969 Oct
			12:00	-	KOST			# Kosrae Time
# Transition time is a guess--see below
Rule	Tonga	1999	max	-	Oct	Sat>=1	0:00	1:00	S
Rule	Tonga	2000	max	-	Apr	Sat>=15	0:00	-	-
# From Paul Eggert <eggert@twinsun.com> (1999-03-22):
# Thomas G. Shanks, The International Atlas (4th edition),
# San Diego: ACS Publications, Inc. (1995).
# From Paul Eggert (1996-11-22):
# Shanks gives no data for Chatham; usno1989 says it's +12:45,
# usno1995 says it's +12:45/+13:45, and IATA SSIM (1991/1996)
# Guess that they adopted DST in 1990.
# @(#)backward	7.15
# @(#)checktab.awk	1.5
				printf "%s:%d: warning:" \
# @(#)europe	7.65
# From Paul Eggert <eggert@twinsun.com> (1999-03-22):
# Thomas G. Shanks, The International Atlas (4th edition),
# San Diego: ACS Publications, Inc. (1995).
# From Paul Eggert (1999-10-06):
# Presumably this was 24:00, two hours earlier than Great Britain.
# Shanks gives 1921 Mar 21 for the following transition.
# From Andrey A. Chernov <ache@astral.msk.su> (1993-11-12):
# My sources says, that it is Mar 20, not 21.
# The following transition is from Shanks's 4th edition (1995).
# Transitions before 1991 are from Shanks (1995).
			3:00	Russia	MSK/MSD	1991 Mar 31 2:00s
			2:00	-	EET	1992 Mar 29 2:00s
			2:00	1:00	EEST	1992 Sep 27 2:00s
# From Shanks (1991):
# Shanks gives 1946-10-06; go with the PTB.
# From Paul Eggert <eggert@twinsun.com> (1993-12-09):
# Reykavik was -1:28 from 1837 to 1908, local mean time before that.
			# Shanks says 1944-08-08, but
			# Riga fell to the Red Army on 1944-10-13.
			2:00	E-Eur	EE%sT
# Shanks gives 1916 May 1 0:00 and 1916 Oct 1 0:00; go with Whitman.
# Before 1937, Shanks says just `0:20'; we use Whitman's more precise figure.
			2:00	E-Eur	EE%sT
# From Shanks (1991):
# Shanks omits the first two transitions in 1940; go with Whitman.
# @(#)iso3166.tab	1.6
# From Paul Eggert <eggert@twinsun.com> (1996-09-03):
# 1.  ISO 3166-1:1997 2-character country code.  See: 
# The PS code below has been reserved for Palestine by the ISO;
# however, the code is not yet officially assigned to Palestine.  Please see
# <a href="ftp://ftp.informatik.uni-erlangen.de/pub/doc/ISO/ISO-3166-background">
# Cord Wischhoefer, Country Code Elements for Palestine (1996-07-24)
# </a>.
#
FX	France, Metropolitan
# @(#)northamerica	7.47
# From Paul Eggert <eggert@twinsun.com> (1996-11-22):
# Thomas G. Shanks, The International Atlas (4th edition),
# San Diego: ACS Publications, Inc. (1995).
# The data for Canada are all from Shanks (1991).
# For what it's worth, Shanks (1995) says that Atikokan has agreed with
# Dawswon Creek uses MST.  Much of east BC is like Edmonton.
# From Paul Eggert (1996-10-07):
# Shanks's table for Watson Lake is corrupted, so we have no data there.
# The change announcement
# From Paul Eggert <eggert@twinsun.com> (1993-11-18):
# Shanks also says there are four zones, but disagrees about the fourth.
# Instead of GMT-6 with DST, he says there's GMT-8 without DST.

# From Shanks (1991):
Rule	BajaN	1950	1966	-	Apr	lastSun	2:00	1:00	D
Rule	BajaN	1950	1961	-	Sep	lastSun	2:00	0	S
Rule	BajaN	1961	1966	-	Oct	lastSun	2:00	0	S
Zone America/Cancun	-5:47:04 -	LMT	1922 Jan  1  1:12:42
Zone America/Chihuahua	-7:04:20 -	LMT	1921 Dec 31 23:55:44
# N Baja California
			-8:00	BajaN	P%sT	1967 Apr lastSun 2:00
# Baja California
Zone America/Ensenada	-7:46:28 -	LMT	1922 Jan  1  0:13:32
			-8:00	-	PST	1927 Jun 10 23:00
			-7:00	-	MST	1930 Nov 16
			-8:00	-	PST	1942 Apr
			-7:00	-	MST	1949 Jan 14
			-8:00	-	PST	1996
			-8:00	Mexico	P%sT
# Shanks gives some very odd dates for 1991, and stops there.
# For now, we won't guess further.
			-5:36	-	SJMT	1921 Jan 15 # San Jose Mean Time
			-5:30	-	HMT	1925 Jul 19 12:00 # Havana MT
# Shanks says AT is 2:00, but IATA SSIM (1991/1996) says 1:00s.  Go with IATA.
# From Shanks (1991):
			-5:00	-	EST	1974 Jan 6 2:00
# @(#)southamerica	7.31
# Thomas G. Shanks, The International Atlas (4th edition),
# San Diego: ACS Publications, Inc. (1995).
# Shanks gives 1989 Mar 16 and stops after 1990 Mar 4; go with Otero.
# From Paul Eggert (1996-11-22):
# Let's make the following assumptions:
#
# * All data in Shanks are correct through 1990.  In particular,
#   Shanks was right when he said Acre stopped observing DST in mid-1988.
# * Areas where Shanks reports DST up to 1990, but the IATA reports no DST
#   in 1995, stopped observing DST in mid-1990.
#
# Under these assumptions Brazil needs 7 entries to cover all the distinct
# time zone histories since 1970:
#
# Noronha (UTC-2), Fortaleza (UTC-3), and Manaus (UTC-4) stopped observing DST
#	in mid-1990.
# Maceio (UTC-3) stopped observing DST in mid-1990, but started again mid-1995.
# Sao Paulo (UTC-3) and Cuiaba (UTC-4) always observed DST.
# Porto Acre (UTC-5) stopped observing DST in mid-1988.

# From Rodrigo Feher <feher@pobox.com> (1998-01-17):
# Reading "southamerica" file in timezone 7.55 I've found an
# error. Line 193 say "Territory of Acre". It is not a territory anymore
# but a state.

# From Paul Eggert (1998-09-28):
# </a> (1998-09-25, in Portuguese).
# (1999-08-23), adopted by same states, says only 1999-10-03 and 2000-02-27;
# after that, these rules are guesses and are quite possibly wrong,
# but they are more likely than no DST at all.
			-2:00	Brazil	FN%sT	1990 Jul
# Amapa, east Para
			-3:00	Brazil	BR%sT	1988 Jul
# Maranhao, Piaui, Ceara, Rio Grande do Norte, Paraiba,
# Pernambuco (except Fernando de Noronha)
			-3:00	Brazil	BR%sT	1990 Jul
			-3:00	-	BRT
# Tocantins
			-3:00	Brazil	BR%sT	1990 Jul
			-3:00	-	BRT	1995 Jul
# Alagoas, Sergipe
			-3:00	Brazil	BR%sT	1990 Jul
			-3:00	-	BRT	1995 Jul
			-3:00	Brazil	BR%sT	1996 Jul
			-3:00	-	BRT
# Bahia, Goias, Distrito Federal, Minas Gerais, Espirito Santo, Rio de Janeiro,
# Sao Paulo, Parana, Santa Catarina, Rio Grande do Sul
			-3:00	-	BRST	1964
			-4:00	Brazil	AM%sT	1990 Jul
			-4:00	-	AMT
# Roraima, west Para, Rondonia
			-4:00	Brazil	AM%sT	1988 Jul
# Amazonas
			-4:00	Brazil	AM%sT	1988 Jul
			-4:00	-	AMT	1993 Jul
			-4:00	Brazil	AM%sT	1994 Jul
# Acre
			-5:00	Brazil	AC%sT	1988 Jul
# (1996-09) says 1998-03-08.  Ignore these for now.
# Shanks (1995) estimates 1993-04-03 24:00 for this; go with IATA.
# Shanks (1995) says that Bottom and Oranjestad have been at -4:00 since

# From Bob Devine (1988-01-28):
# Paraguay: First day in October to last in March.  Midnight switch??
# Since 1980.

# From U. S. Naval Observatory (1989-01-19):
# PARAGUAY            4 H  BEHIND UTC
# PARAGUAY            3 H  BEHIND UTC    OCT 1, '88-MAR 31, '89

# From Shanks (1991):
Rule	Para	1975	1978	-	Oct	 1	0:00	1:00	S
# Shanks says 1979 was all DST.
Rule	Para	1980	1991	-	Apr	 1	0:00	0	-
Rule	Para	1980	1988	-	Oct	 1	0:00	1:00	S
Rule	Para	1996	1998	-	Mar	 1	0:00	0	-
Rule	Para	1999	max	-	Feb	lastSat	0:00	0	-
# From Shanks (1991):
# Shanks's 4th edition (1995) says no DST was observed in 1990/1 and 1991/2,
# and that 1992/3's DST was from 10-25 to 03-01.  Go with IATA.
# @(#)zone.tab	1.15
BR	-0846-06354	America/Porto_Velho	W Para, Rondonia, Roraima
CN	+2217+11409	Asia/Hong_Kong	Hong Kong
MX	+2105-08646	America/Cancun	Eastern Time
MX	+1924-09909	America/Mexico_City	Central Time
MX	+3152-11637	America/Ensenada	Pacific Time - most locations
MX	+3232-11701	America/Tijuana	Pacific Time - north Baja California
Fixed code: 1999-11-09  Ulrich Drepper  <drepper@cygnus.com>

	* elf/dl-load.c (_dl_dst_count): Allow $ORIGIN to point to
	directory with the reference since this is as secure as using the
	object with the dependency.
	(_dl_dst_substitute): Likewise.

	* elf/dl-load.c (_dl_dst_count): Change strings in first two
	strncmp calls to allow reuse.
	(_dl_dst_substitute): Likewise.

1999-11-01  Arnold D. Robbins  <arnold@skeeve.com>

	* posix/regex.c (init_syntax_once): move below definition of
	ISALNUM etc., then use ISALNUM to init the table, so that
	the word ops will work if i18n'ed.
	(SYNTAX): And subscript with 0xFF for 8bit character sets.

1999-11-09  Andreas Jaeger  <aj@suse.de>

	* sysdeps/unix/getlogin_r.c (getlogin_r): Sync with getlogin
	implementation for ttyname_r call; fix inverted condition; return
	ut_user.  Closes PR libc/1438.

1999-11-09  Ulrich Drepper  <drepper@cygnus.com>

	* timezone/checktab.awk: Update from tzcode1999h.
	* timezone/africa: Update from tzdata1999i.
	* timezone/asia: Likewise.
	* timezone/australasia: Likewise.
	* timezone/backward: Likewise.
	* timezone/europe: Likewise.
	* timezone/northamerica: Likewise.
	* timezone/southamerica: Likewise.
	* timezone/iso3166.tab: Likewise.
	* timezone/zone.tab: Likewise.

	* sysdeps/unix/sysv/linux/bits/resource.h: Define values also as
	macros.  Patch by brg@csua.berkeley.edu [PR libc/1439].

1999-11-09  Andreas Jaeger  <aj@suse.de>

	* posix/Makefile (tests): Added tst-getlogin.

	* posix/tst-getlogin.c: New file, contains simple tests for
	getlogin and getlogin_r.

1999-11-09  Andreas Schwab  <schwab@suse.de>

	* misc/syslog.c: For LOG_PERROR only append a newline if
	necessary.

  const char *const start = name;
      /* $ORIGIN is not expanded for SUID/GUID programs.

	 Note that it is no bug that the strings in the first two `strncmp'
	 calls are longer than the sequence which is actually tested.  */
      if ((((strncmp (&name[1], "ORIGIN}", 6) == 0
	     && (!__libc_enable_secure
		 || ((name[7] == '\0' || (is_path && name[7] == ':'))
		     && (name == start || (is_path && name[-1] == ':'))))
	     && (len = 7) != 0)
	    || (strncmp (&name[1], "PLATFORM}", 8) == 0 && (len = 9) != 0))
	      && ((strncmp (&name[2], "ORIGIN}", 7) == 0
		   && (!__libc_enable_secure
		       || ((name[9] == '\0' || (is_path && name[9] == ':'))
			   && (name == start || (is_path && name[-1] == ':'))))
		   && (len = 9) != 0)
  const char *const start = name;
      /* Note that it is no bug that the strings in the first two `strncmp'
	 calls are longer than the sequence which is actually tested.  */
	  if ((((strncmp (&name[1], "ORIGIN}", 6) == 0 && (len = 7) != 0)
		|| (strncmp (&name[1], "PLATFORM}", 8) == 0 && (len = 9) != 0))
		      ? (__libc_enable_secure
			 && ((name[len] != '\0'
			      && (!is_path || name[len] != ':'))
			     || (name != start
				 && (!is_path || name[-1] != ':')))
			 ? NULL : l->l_origin)
  /* Determine the number of DST elements.  */
and a pointer to the parent of the deleted node is returned by the
function.  If there is no matching entry in the tree nothing can be
deleted and the function returns @code{NULL}.  If the root of the tree
is deleted @code{tdelete} returns some unspecified value not equal to
@code{NULL}.
		/* Append a newline if necessary.  */
		if (buf[bufsize - 1] != '\n')
		  {
		    ++v;
		    v->iov_base = (char *) "\n";
		    v->iov_len = 1;
		  }
		(void)__writev(STDERR_FILENO, iov, v - iov + 1);
		   tst-preadwrite test-vfork regexbug1 tst-getlogin
#ifndef emacs
/* How many characters in the character set.  */
# define CHAR_SET_SIZE 256

# ifdef SYNTAX_TABLE

extern char *re_syntax_table;

# else /* not SYNTAX_TABLE */

static char re_syntax_table[CHAR_SET_SIZE];

static void
init_syntax_once ()
{
   register int c;
   static int done = 0;

   if (done)
     return;
   bzero (re_syntax_table, sizeof re_syntax_table);

   for (c = 0; c < CHAR_SET_SIZE; ++c)
     if (ISALNUM (c))
	re_syntax_table[c] = Sword;

   re_syntax_table['_'] = Sword;

   done = 1;
}

# endif /* not SYNTAX_TABLE */

# define SYNTAX(c) re_syntax_table[((c) & 0xFF)]

#endif /* emacs */

/* Copyright (C) 1999 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with the GNU C Library; see the file COPYING.LIB.  If not,
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  */

#include <unistd.h>
#include <stdio.h>
#include <string.h>

int
main (void)
{
  char *login;
  int errors = 0;

  login = getlogin ();
  if (login == NULL)
    puts ("getlogin returned NULL, no further tests");
  else
    {
      char name[1024];
      int ret;

      printf ("getlogin returned: `%s'\n", login);

      ret = getlogin_r (name, sizeof (name));
      if (ret == 0)
	{
	  printf ("getlogin_r returned: `%s'\n", name);
	  if (strcmp (name, login) != 0)
	    {
	      puts ("Error: getlogin and getlogin_r returned different names");
	      ++errors;
	    }
	}
      else
	{
	  printf ("Error: getlogin_r returned: %d (%s)\n",
		  ret, strerror (ret));
	  ++errors;
	}
    }

  return errors != 0;
}
  /* Get name of tty connected to fd 0.  Return if not a tty or
     if fd 0 isn't open.  Note that a lot of documentation says that
     getlogin() is based on the controlling terminal---what they
     really mean is "the terminal connected to standard input".  The
     getlogin() implementation of DEC Unix, SunOS, Solaris, HP-UX all
     return NULL if fd 0 has been closed, so this is the compatible
     thing to do.  Note that ttyname(open("/dev/tty")) on those
     systems returns /dev/tty, so that is not a possible solution for
     getlogin().  */
  result = __ttyname_r (0, real_tty_path, sizeof (tty_pathname));
  
  if (result != 0)
    return result;
      size_t needed = strlen (ut->ut_user) + 1;
      if (needed > name_len)
	  memcpy (name, ut->ut_user, needed);
#define PRIO_PROCESS PRIO_PROCESS
#define PRIO_PGRP PRIO_PGRP
#define PRIO_USER PRIO_USER
# @(#)africa	7.32
# Thomas G. Shanks, The International Atlas (5th edition),
# San Diego: ACS Publications, Inc. (1999).
			1:00	Libya	CE%sT	1990 May  4
# The following entries are all from Shanks;
# the IATA SSIM data contain some obvious errors.
			2:00	-	EET	1996 Sep 30
			1:00	-	CET	1997 Apr  4
			1:00	1:00	CEST	1997 Oct  4
# Shanks reports no DST after 1998-04; go with IATA.
# @(#)asia	7.49
# Thomas G. Shanks, The International Atlas (5th edition),
# San Diego: ACS Publications, Inc. (1999).
# From Paul Eggert (1999-10-29):
# then to 4:00 with no DST in fall 1995, then readopting Russian DST in 1997.
# Go with Shanks, even when he disagrees with others.  Edgar Der-Danieliantz
			3:00 RussiaAsia	AM%sT	1995 Sep 24 2:00s
# From Shanks:
# Shanks writes that Taiwan observed DST during 1945, when it
# East Timor
# Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
Zone	Asia/Dili	8:22:20 -	LMT	1912
			8:00	-	TPT	1942 Feb 21 23:00
			9:00	-	JST	1945 Aug
			9:00	-	TPT	1976 May  3
			8:00	-	TPT	# East Timor Time

# Shanks says the next transition was at 1924 Jan 1 0:13,
# but this must be a typo.
			7:07:12	-	JMT	1923 Dec 31 23:47:12 # Jakarta
# Shanks says Iraq did not observe DST 1992/1997 or 1999 on; ignore this.
# From Shanks:
# Transitions through 1991 are from Shanks.
Rule	Kirgiz	1992	1996	-	Sep	lastSun	0:00	0	-
			5:00	1:00	FRUST	1991 Aug 31 2:00 # independence
# From Shanks:
# IATA SSIM (1996-09) says 1996-10-25; go with Shanks.
Rule	Mongol	1996	only	-	Oct	lastSun	0:00	0	-
# IATA SSIM (1998-02) says 1998-04-02;
# 2000-04-02, and 2001-04-02; ignore all these claims and go with Shanks.
Rule	Syria	1994	1996	-	Apr	 1	0:00	1:00	S
Rule	Syria	1997	1998	-	Mar	lastMon	0:00	1:00	S
Rule	Syria	1999	max	-	Apr	 1	0:00	1:00	S
# From Shanks.
			5:00	1:00	DUSST	1991 Sep  9 2:00s
# From Shanks.
			5:00 RussiaAsia	ASH%sT	1991 Mar 31 2:00
			4:00 RussiaAsia	ASH%sT	1991 Oct 27 # independence
			4:00 RussiaAsia TM%sT	1992 Jan 19 2:00
# 1991 transitions are from Shanks.
			5:00 RussiaAsia	TAS%sT	1991 Sep  1 # independence
			5:00 RussiaAsia	UZ%sT	1992
			5:00 RussiaAsia	TAS%sT	1991 Sep  1 # independence
			5:00 RussiaAsia	UZ%sT	1992
# From Shanks:
# @(#)australasia	7.52
Rule	Aus	1917	only	-	Jan	 1	0:01	1:00	-
Rule	AT	1991	1999	-	Oct	Sun>=1	2:00s	1:00	-
Rule	AT	2000	only	-	Aug	lastSun	2:00s	1:00	-
Rule	AT	2001	max	-	Oct	Sun>=1	2:00s	1:00	-
			10:00	-	EST	1916 Oct 1 2:00
			10:00	1:00	EST	1917 Feb
Rule	LH	1986	1991	-	Mar	Sun>=15	2:00s	0	-
Rule	LH	1992	1995	-	Mar	Sun>=1	2:00s	0	-
# From Shanks:
			11:00	-	KOST	1969 Oct	# Kosrae Time
			12:00	-	KOST	1999
			11:00	-	KOST
# Shanks says the following was at 2:00; go with IATA.
Rule	Tonga	1999	max	-	Oct	Sat>=1	2:00s	1:00	S
Rule	Tonga	2000	max	-	Apr	Sun>=16	2:00s	-	-
# From Paul Eggert <eggert@twinsun.com> (1999-10-29):
# Thomas G. Shanks, The International Atlas (5th edition),
# San Diego: ACS Publications, Inc. (1999).
# From Alex Livingston (1999-10-04):
# I heard on the ABC (Australian Broadcasting Corporation) radio news on the
# (long) weekend that Tasmania, which usually goes its own way in this regard,
# has decided to join with most of NSW, the ACT, and most of Victoria
# (Australia) and start daylight saving on the last Sunday in August in 2000
# instead of the first Sunday in October.

# From Paul Eggert (1999-10-29):
# Shanks gives no time data for Chatham; usno1989 says it's +12:45,
# usno1995 says it's +12:45/+13:45, and IATA SSIM (1991/1999)
# Guess that they have been in lock-step with NZ since 1990.
# From Paul Eggert (1999-10-29):
# The Federated States of Micronesia Visitors Board writes in
# <a href="http://www.fsmgov.org/info/clocks.html">
# The Federated States of Micronesia - Visitor Information
# </a> (1999-01-26)
# that Truk and Yap are GMT+10, and Ponape and Kosrae are GMT+11.
# We don't know when Kosrae switched from GMT+12; assume January 1 for now.


# From Rives McDow (1999-10-06):
# Tonga started its Daylight Saving on Saturday morning October 2nd at 0200am.
# Daylight Saving ends on April 16 at 0300am which is Sunday morning.
# @(#)backward	7.16
Link	America/Tijuana		America/Ensenada
# @(#)checktab.awk	1.6
				printf "%s:%d: warning: " \
# @(#)europe	7.66
# From Paul Eggert <eggert@twinsun.com> (1999-10-29):
# Thomas G. Shanks, The International Atlas (5th edition),
# San Diego: ACS Publications, Inc. (1999).
# From Paul Eggert (1999-10-22):
# No doubt this was 24:00, two or three hours earlier than Great Britain.
# The following transition is from Shanks.
# Transitions before 1991 are from Shanks.
			3:00	Russia	MSK/MSD	1990
			3:00	-	MSK	1991 Mar 31 2:00s
			2:00	-	EET	1992 Mar 29 0:00s
			2:00	1:00	EEST	1992 Sep 27 0:00s
# From Paul Eggert <eggert@twinsun.com> (1999-10-29):
# Reykavik was 21W57 from 1837 to 1908, local mean time before that.
# see commentary for Romania
			2:00	E-Eur	EE%sT	1997
			2:00	EU	EE%sT
# Shanks gives 1916 Apr 30 24:00 and 1916 Oct 1 00:00; go with Whitman.
#
# From Paul Eggert (1999-10-07):
# <a href="http://www.nineoclock.ro/POL/1778pol.html">
# Nine O'clock</a> (1998-10-23) reports that the switch occurred at
# 04:00 local time in fall 1998.  For lack of better info,
# assume that Romania and Moldova switched to EU rules in 1997,
# the same year as Bulgaria.
#
			2:00	E-Eur	EE%sT	1997
			2:00	EU	EE%sT
# From Shanks:
# @(#)iso3166.tab	1.7
# From Paul Eggert <eggert@twinsun.com> (1999-10-13):
# 1.  ISO 3166-1:1999 2-character country code.  See:
#	<a href="http://www.din.de/gremien/nas/nabd/iso3166ma/codlstp1.html">
#	ISO 3166-1: The Code List
#	</a>.
HK	Hong Kong
# @(#)northamerica	7.48
# Wayne County, Kentucky
# From
# <a href="http://frwebgate.access.gpo.gov/cgi-bin/getdoc.cgi?dbname=1999_register&docid=99-26945-filed">
# Federal Register Doc. 99-26945
# </a> (1999-10-14 08:45-04)
# In response to a petition by the Wayne County, Kentucky, Fiscal Court,
# the Department of Transportation (DOT) proposed to move Wayne County,
# Kentucky, from the Central Time Zone to the Eastern Time Zone.... Now
# the earliest date that the proposed change might take effect is
# October 29, 2000.
# From Paul Eggert <eggert@twinsun.com> (1999-10-29):
# Thomas G. Shanks, The International Atlas (5th edition),
# San Diego: ACS Publications, Inc. (1999).
# The data for Canada are all from Shanks.
# For what it's worth, Shanks says that Atikokan has agreed with
# Dawson Creek uses MST.  Much of east BC is like Edmonton.
# From Paul Eggert (1999-10-29):
# Nunavut moves to single time zone Oct. 31
# From Shanks:
Rule	BajaN	1954	1961	-	Apr	lastSun	2:00	1:00	D
Rule	BajaN	1954	1961	-	Sep	lastSun	2:00	0	S
Zone America/Cancun	-5:47:04 -	LMT	1922 Jan  1  0:12:56
Zone America/Chihuahua	-7:04:20 -	LMT	1921 Dec 31 23:55:40
# Baja California
			-8:00	BajaN	P%sT	1976
			-5:36:20 -	SJMT	1921 Jan 15 # San Jose Mean Time
			-5:29:36 -	HMT	1925 Jul 19 12:00 # Havana MT
# Shanks says AT is 2:00, but IATA SSIM (1991/1997) says 1:00s.  Go with IATA.
# From Shanks:
			-5:00	-	EST	1974 Apr 28 2:00
# @(#)southamerica	7.32
# Thomas G. Shanks, The International Atlas (5th edition),
# San Diego: ACS Publications, Inc. (1999).
# Shanks stops after 1992-03-01; go with Otero.
# From Paul Eggert (1998-10-29):
# </a> (1999-10-04, in Portuguese).
# (1999-08-23) adopted by same states.
# Decree <a href="http://pcdsh01.on.br/DecHV99.gif">3,188</a> (1999-09-30)
# adds SE, AL, PE, PR, RN, CE, PI, MA and RR.
# These give only one year's rules.  After that, the rules are guesses
# and are quite possibly wrong, but are more likely than no DST at all.
			-2:00	Brazil	FN%sT	1990 Sep 17
# Amapa (AP), east Para (PA)
			-3:00	Brazil	BR%sT	1988 Sep 12
# Maranhao (MA), Piaui (PI), Ceara (CE), Rio Grande do Norte (RN),
# Paraiba (PB), Pernambuco (PE) (except Fernando de Noronha)
			-3:00	Brazil	BR%sT	1990 Sep 17
			-3:00	-	BRT	1999 Sep 30
			-3:00	Brazil	BR%sT
# Tocantins (TO)
			-3:00	Brazil	BR%sT	1990 Sep 17
			-3:00	-	BRT	1995 Sep 14
# Alagoas (AL), Sergipe (SE)
			-3:00	Brazil	BR%sT	1990 Sep 17
			-3:00	-	BRT	1995 Oct 13
			-3:00	Brazil	BR%sT	1996 Sep  4
			-3:00	-	BRT	1999 Sep 30
			-3:00	Brazil	BR%sT
# Bahia (BA), Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
# Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),
# Santa Catarina (SC), Rio Grande do Sul (RS)
			-3:00	1:00	BRST	1964
			-4:00	Brazil	AM%sT
# west Para (PA), Rondonia (RO)
			-4:00	Brazil	AM%sT	1988 Sep 12
# Roraima (RR)
Zone America/Boa_Vista	-4:02:40 -	LMT	1914
			-4:00	Brazil	AM%sT	1988 Sep 12
			-4:00	-	AMT	1999 Sep 30
			-4:00	Brazil	AM%sT
#
# Amazonas (AM)
			-4:00	Brazil	AM%sT	1988 Sep 12
			-4:00	-	AMT	1993 Sep 28
			-4:00	Brazil	AM%sT	1994 Sep 22
# Acre (AC)
			-5:00	Brazil	AC%sT	1988 Sep 12
# (1996-09) says 1998-03-08.  Ignore these.
# Shanks specifies 24:00 for 1992 transition times; go with IATA,
# as it seems implausible to change clocks at midnight New Year's Eve.
# Shanks says that Bottom and Oranjestad have been at -4:00 since
# From Paul Eggert (1999-10-29):
# Shanks (1999) says that spring transitions are from 01:00 -> 02:00,
# and autumn transitions are from 00:00 -> 23:00.  Go with earlier
# editions of Shanks, and with the IATA, who say transitions occur at 00:00.
Rule	Para	1975	1988	-	Oct	 1	0:00	1:00	S
Rule	Para	1979	1991	-	Apr	 1	0:00	0	-
Rule	Para	1996	only	-	Mar	 1	0:00	0	-
# IATA SSIM (1997-09) says Mar 1; go with Shanks.
Rule	Para	1997	only	-	Feb	lastSun	0:00	0	-
Rule	Para	1998	only	-	Mar	 1	0:00	0	-
# IATA SSIM (1999-02) says lastSat, not lastSun; go with Shanks.
Rule	Para	1999	max	-	Feb	lastSun	0:00	0	-
# From Shanks:
# Shanks says no DST was observed in 1990/1 and 1991/2,
# and that 1992/3's DST was from 10-25 to 03-01.  Go with IATA.
# @(#)zone.tab	1.16
BR	-0846-06354	America/Porto_Velho	W Para, Rondonia
BR	+0249-06040	America/Boa_Vista	Roraima
HK	+2217+11409	Asia/Hong_Kong
MX	+1924-09909	America/Mexico_City	Central Time - most locations
MX	+2105-08646	America/Cancun	Central Time - Quintana Roo
MX	+3232-11701	America/Tijuana	Pacific Time
TP	-0833+12535	Asia/Dili