Hi David,
Thanks for the patch.
That bug was still in the latest test release.
I've applied it.
And thanks to Hon-Yin for the report.
"David J. MacKenzie" <[EMAIL PROTECTED]> wrote:
...
| The bug you've reported is in this calculation in get_date():
| if (yyHaveDay && !yyHaveDate)
| {
| tm.tm_mday += ((yyDayNumber - tm.tm_wday + 7) % 7
| + 7 * (yyDayOrdinal - (0 < yyDayOrdinal)));
| Start = mktime (&tm);
| if (Start == (time_t) -1)
| return Start;
| }
| Here, yyDayNumber is 0-6 and yyDayOrdinal is -1, which is what "last" translates to
| in the lexer. mktime() has already been called at least once, setting tm.tm_isdst,
| but now we're changing the day so we need to reset it to -1 meaning unknown.
|
| The fix is:
|
| --- getdate.y.save Sat Aug 7 05:39:05 1999
| +++ getdate.y Wed Apr 4 20:49:09 2001
| @@ -998,6 +998,7 @@
| {
| tm.tm_mday += ((yyDayNumber - tm.tm_wday + 7) % 7
| + 7 * (yyDayOrdinal - (0 < yyDayOrdinal)));
| + tm.tm_isdst = -1;
| Start = mktime (&tm);
| if (Start == (time_t) -1)
| return Start;
|
|
_______________________________________________
Bug-sh-utils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-sh-utils