[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: date -d 'now - 1 hour'
From: |
Paul Eggert |
Subject: |
Re: date -d 'now - 1 hour' |
Date: |
Sun, 06 Jun 2004 11:57:29 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Dan Jacobson <address@hidden> writes:
> $ date -d 'now + 1 hour'
> Sat Jun 5 09:25:10 GMT-8 2004
> $ date -d 'now - 1 hour'
> Sat Jun 5 09:25:15 GMT-8 2004
Thanks for reporting that. Here's a patch, which I installed into gnulib.
2004-06-06 Paul Eggert <address@hidden>
* getdate.y (yylex): Allow space between sign and number.
Problem reported by Dan Jacobson.
--- getdate.y.~1.81.~ 2004-03-30 23:20:49 -0800
+++ getdate.y 2004-06-06 11:54:23 -0700
@@ -844,7 +844,8 @@ yylex (YYSTYPE *lvalp, parser_control *p
if (c == '-' || c == '+')
{
sign = c == '-' ? -1 : 1;
- c = *++pc->input;
+ while (c = *++pc->input, ISSPACE (c))
+ continue;
if (! ISDIGIT (c))
/* skip the '-' sign */
continue;