]> Savannah Git Hosting - gnulib.git/commitdiff
parse-datetime: fix 'T' military timezone handling
authorAssaf Gordon <assafgordon@gmail.com>
Sat, 10 Aug 2019 19:17:49 +0000 (13:17 -0600)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 10 Aug 2019 20:03:00 +0000 (13:03 -0700)
* lib/parse-datetime.y (zone):
follow-up to the previous commit: the 'T' case is handled outside the
conversion table (used as either military timezone UTC-7 or ISO8601
separator). Change it from "HOUR(7)" to "-HOUR(7)" to match other
timezone letters.

ChangeLog
lib/parse-datetime.y

index 7616b5efd96a544d478885c3de22bcaea92aa883..7dc1aa26135d9fe0998ef101ad94634e5f9a2782 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2019-08-10  Assaf Gordon <assafgordon@gmail.com>
+
+       parse-datetime: fix 'T' military timezone handling
+       * lib/parse-datetime.y (zone):
+       follow-up to the previous commit: the 'T' case is handled outside the
+       conversion table (used as either military timezone UTC-7 or ISO8601
+       separator). Change it from "HOUR(7)" to "-HOUR(7)" to match other
+       timezone letters.
+
 2019-08-09  Paul Eggert  <eggert@cs.ucla.edu>
 
        parse-datetime: fix military timezone letters
index d371b9cb19d13993992707fa1184a33616dc67a4..218e3dc5bd02ad17da9bd54a6c300474b76c34c4 100644 (file)
@@ -754,14 +754,14 @@ zone:
     tZONE
       { pc->time_zone = $1; }
   | 'T'
-      { pc->time_zone = HOUR (7); }
+      { pc->time_zone = -HOUR (7); }
   | tZONE relunit_snumber
       { pc->time_zone = $1;
         if (! apply_relative_time (pc, $2, 1)) YYABORT;
         debug_print_relative_time (_("relative"), pc);
       }
   | 'T' relunit_snumber
-      { pc->time_zone = HOUR (7);
+      { pc->time_zone = -HOUR (7);
         if (! apply_relative_time (pc, $2, 1)) YYABORT;
         debug_print_relative_time (_("relative"), pc);
       }