CVS update: /ccvs/lib/

[email protected] 12 Apr 2005 14:20:19 -0000
Newsgroups gmane.comp.version-control.cvs.cvs
Message-ID <[email protected]>
User: dprice  
Date: 05/04/12 07:20:19

Modified:
 /ccvs/lib/
  ChangeLog, getdate.y, getdate.c

Log:
 * getdate.y: Update from GNULIB.

File Changes:

Directory: /ccvs/lib/
=====================

File [changed]: ChangeLog
Url: https://ccvs.cvshome.org/source/browse/ccvs/lib/ChangeLog?r1=1.411&r2=1.412
Delta lines:  +4 -0
-------------------
--- ChangeLog	6 Apr 2005 15:58:56 -0000	1.411
+++ ChangeLog	12 Apr 2005 14:20:16 -0000	1.412
@@ -1,3 +1,7 @@
+2005-04-12  Derek Price  <[email protected]>
+
+	* getdate.y: Update from GNULIB.
+
 2005-04-06  Derek Price  <[email protected]>
 
 	* getdate.y: Update from GNULIB.

File [changed]: getdate.y
Url: https://ccvs.cvshome.org/source/browse/ccvs/lib/getdate.y?r1=1.30&r2=1.31
Delta lines:  +18 -5
--------------------
--- getdate.y	6 Apr 2005 15:58:56 -0000	1.30
+++ getdate.y	12 Apr 2005 14:20:16 -0000	1.31
@@ -645,6 +645,17 @@
   { NULL, 0, 0 }
 };
 
+/* The universal time zone table.  These labels can be used even for
+   time stamps that would not otherwise be valid, e.g., GMT time
+   stamps in London during summer.  */
+static table const universal_time_zone_table[] =
+{
+  { "GMT",	tZONE,     HOUR ( 0) },	/* Greenwich Mean */
+  { "UT",	tZONE,     HOUR ( 0) },	/* Universal (Coordinated) */
+  { "UTC",	tZONE,     HOUR ( 0) },
+  { NULL, 0, 0 }
+};
+
 /* The time zone table.  This table is necessarily incomplete, as time
    zone abbreviations are ambiguous; e.g. Australians interpret "EST"
    as Eastern time in Australia, not as US Eastern Standard Time.
@@ -652,9 +663,6 @@
    abbreviations; use numeric abbreviations like `-0500' instead.  */
 static table const time_zone_table[] =
 {
-  { "GMT",	tZONE,     HOUR ( 0) },	/* Greenwich Mean */
-  { "UT",	tZONE,     HOUR ( 0) },	/* Universal (Coordinated) */
-  { "UTC",	tZONE,     HOUR ( 0) },
   { "WET",	tZONE,     HOUR ( 0) },	/* Western European */
   { "WEST",	tDAYZONE,  HOUR ( 0) },	/* Western European Summer */
   { "BST",	tDAYZONE,  HOUR ( 0) },	/* British Summer */
@@ -787,7 +795,12 @@
 {
   table const *tp;
 
-  /* Try local zone abbreviations first; they're more likely to be right.  */
+  for (tp = universal_time_zone_table; tp->name; tp++)
+    if (strcmp (name, tp->name) == 0)
+      return tp;
+
+  /* Try local zone abbreviations before those in time_zone_table, as
+     the local ones are more likely to be right.  */
   for (tp = pc->local_time_zone_table; tp->name; tp++)
     if (strcmp (name, tp->name) == 0)
       return tp;

File [changed]: getdate.c
Url: https://ccvs.cvshome.org/source/browse/ccvs/lib/getdate.c?r1=1.38&r2=1.39
Delta lines:  +18 -5
--------------------
--- getdate.c	6 Apr 2005 15:58:56 -0000	1.38
+++ getdate.c	12 Apr 2005 14:20:16 -0000	1.39
@@ -2044,6 +2044,17 @@
   { NULL, 0, 0 }
 };
 
+/* The universal time zone table.  These labels can be used even for
+   time stamps that would not otherwise be valid, e.g., GMT time
+   stamps in London during summer.  */
+static table const universal_time_zone_table[] =
+{
+  { "GMT",	tZONE,     HOUR ( 0) },	/* Greenwich Mean */
+  { "UT",	tZONE,     HOUR ( 0) },	/* Universal (Coordinated) */
+  { "UTC",	tZONE,     HOUR ( 0) },
+  { NULL, 0, 0 }
+};
+
 /* The time zone table.  This table is necessarily incomplete, as time
    zone abbreviations are ambiguous; e.g. Australians interpret "EST"
    as Eastern time in Australia, not as US Eastern Standard Time.
@@ -2051,9 +2062,6 @@
    abbreviations; use numeric abbreviations like `-0500' instead.  */
 static table const time_zone_table[] =
 {
-  { "GMT",	tZONE,     HOUR ( 0) },	/* Greenwich Mean */
-  { "UT",	tZONE,     HOUR ( 0) },	/* Universal (Coordinated) */
-  { "UTC",	tZONE,     HOUR ( 0) },
   { "WET",	tZONE,     HOUR ( 0) },	/* Western European */
   { "WEST",	tDAYZONE,  HOUR ( 0) },	/* Western European Summer */
   { "BST",	tDAYZONE,  HOUR ( 0) },	/* British Summer */
@@ -2186,7 +2194,12 @@
 {
   table const *tp;
 
-  /* Try local zone abbreviations first; they're more likely to be right.  */
+  for (tp = universal_time_zone_table; tp->name; tp++)
+    if (strcmp (name, tp->name) == 0)
+      return tp;
+
+  /* Try local zone abbreviations before those in time_zone_table, as
+     the local ones are more likely to be right.  */
   for (tp = pc->local_time_zone_table; tp->name; tp++)
     if (strcmp (name, tp->name) == 0)
       return tp;