summaryrefslogtreecommitdiff
path: root/lib/parse-datetime.y
diff options
context:
space:
mode:
authorAssaf Gordon <assafgordon@gmail.com>2017-01-04 23:07:12 -0500
committerAssaf Gordon <assafgordon@gmail.com>2017-01-05 00:08:06 -0500
commit5c438e8ce7d9c74078100700cb5faa15b4de23b8 (patch)
treeb215d1e8c456ebb6d44ebf3a1b97c902add2570b /lib/parse-datetime.y
parentf2d4b5caa53bd1ee14e30a6c5f998aa2ed66787c (diff)
downloadgnulib-5c438e8ce7d9c74078100700cb5faa15b4de23b8.tar.gz
parse-datetime: fix debug message of relative part after timezone
Relative part (e.g '+8 days') after a timezone string was not reported (was only reported after a timezone number). Due to the parser's structure, timezone strings with numbers were handled separately. before: # Timezone number + relative part: OK $ ./src/date --debug +%F -d '2013-10-30 00:00:00 +00:00 -8 days' ... date: parsed relative part: -8 day(s) # Timezone string + relative part: missing $ ./src/date --debug +%F -d '2013-10-30 00:00:00 UTC -8 days' [ missing message ] After: messages are printed in both cases. * lib/parse-datetime.y ('zone' token): Call debug_print_relative_time.
Diffstat (limited to 'lib/parse-datetime.y')
-rw-r--r--lib/parse-datetime.y8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/parse-datetime.y b/lib/parse-datetime.y
index 58e817f13b..7196113232 100644
--- a/lib/parse-datetime.y
+++ b/lib/parse-datetime.y
@@ -707,10 +707,14 @@ zone:
{ pc->time_zone = HOUR(7); }
| tZONE relunit_snumber
{ pc->time_zone = $1;
- apply_relative_time (pc, $2, 1); }
+ apply_relative_time (pc, $2, 1);
+ debug_print_relative_time (_("relative"), pc);
+ }
| 'T' relunit_snumber
{ pc->time_zone = HOUR(7);
- apply_relative_time (pc, $2, 1); }
+ apply_relative_time (pc, $2, 1);
+ debug_print_relative_time (_("relative"), pc);
+ }
| tZONE tSNUMBER o_colon_minutes
{ pc->time_zone = $1 + time_zone_hhmm (pc, $2, $3); }
| tDAYZONE