[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnulib] Re: Bug(?) in date concerning 'tomorrow' and 'day'
From: |
Paul Eggert |
Subject: |
[Bug-gnulib] Re: Bug(?) in date concerning 'tomorrow' and 'day' |
Date: |
03 Sep 2003 00:17:29 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
"Jonas Mixter" <address@hidden> writes:
> In Sweden daylight savings is ending at October 26 this year.
> If one run `date --date="2003-10-26 tomorrow"` to convert an iso-8601 date
> into local time (and add a day at the same time), one doesn't get the date
> and time of the 27 October but instead the time 23:00 at the 26'th of
> October.
> If one instead run `date --date="2003-10-26 day"` one get the time and date
> of midnight, October 27.
Thanks for the bug report. I think this bug was fixed in 1999 but the
fix got lost somehow. I installed the following patch into gnulib.
2003-09-03 Paul Eggert <address@hidden>
* getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
"yesterday", "today", and "now" rather than tMINUTE_UNIT. Of
course with correspondingly smaller numbers for tomorrow and
yesterday. From Tadayoshi Funaba. Originally installed into
sh-utils on 1999-08-07, but the patch got lost (I guess during the
coreutils merge?).
Index: getdate.y
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/getdate.y,v
retrieving revision 1.78
retrieving revision 1.79
diff -p -u -r1.78 -r1.79
--- getdate.y 5 Aug 2003 05:14:20 -0000 1.78
+++ getdate.y 3 Sep 2003 07:11:45 -0000 1.79
@@ -527,10 +527,10 @@ static table const time_units_table[] =
/* Assorted relative-time words. */
static table const relative_time_table[] =
{
- { "TOMORROW", tMINUTE_UNIT, 24 * 60 },
- { "YESTERDAY",tMINUTE_UNIT, - (24 * 60) },
- { "TODAY", tMINUTE_UNIT, 0 },
- { "NOW", tMINUTE_UNIT, 0 },
+ { "TOMORROW", tDAY_UNIT, 1 },
+ { "YESTERDAY",tDAY_UNIT, -1 },
+ { "TODAY", tDAY_UNIT, 0 },
+ { "NOW", tDAY_UNIT, 0 },
{ "LAST", tUNUMBER, -1 },
{ "THIS", tUNUMBER, 0 },
{ "NEXT", tUNUMBER, 1 },
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-gnulib] Re: Bug(?) in date concerning 'tomorrow' and 'day',
Paul Eggert <=