NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/44255: parsedate(3) fails with most samples strings from the manpage
The following reply was made to PR lib/44255; it has been noted by GNATS.
From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: lib/44255: parsedate(3) fails with most samples strings from
the manpage
Date: Sun, 26 Dec 2010 07:41:24 +0000
(not sent to gnats)
------
From: Nicolas Joly <njoly%pasteur.fr@localhost>
To: lib-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost
Subject: Re: lib/44255: parsedate(3) fails with most samples strings from the
manpage
Date: Tue, 21 Dec 2010 16:11:41 +0100
On Mon, Dec 20, 2010 at 04:20:00PM +0000, Nicolas Joly wrote:
> >Number: 44255
> >Category: lib
> >Synopsis: parsedate(3) fails with most samples strings from the
> >manpage
> >Description:
> parsedate(3) fails for most sample strings from the manpage
> (unambiguous dates, times and relative items).
I just got some time to look into it ... and this is timezone related.
The testcase do not fail for UTC, but do for Europe/Paris (like other
ones east GMT).
njoly@lanfeust [~]> TZ=UTC /usr/tests/lib/libutil/t_parsedate dates
passed
njoly@lanfeust [~]> TZ=US/Pacific /usr/tests/lib/libutil/t_parsedate dates
passed
njoly@lanfeust [~]> TZ=Europe/Paris /usr/tests/lib/libutil/t_parsedate dates
*** Check failed: /local/src/NetBSD/src/tests/lib/libutil/t_parsedate.c:48:
parsedate("69-09-10", NULL, NULL) != -1 not met
*** Check failed: /local/src/NetBSD/src/tests/lib/libutil/t_parsedate.c:49:
parsedate("2006-11-17", NULL, NULL) != -1 not met
*** Check failed: /local/src/NetBSD/src/tests/lib/libutil/t_parsedate.c:50:
parsedate("10/1/2000", NULL, NULL) != -1 not met
*** Check failed: /local/src/NetBSD/src/tests/lib/libutil/t_parsedate.c:51:
parsedate("20 Jun 1994", NULL, NULL) != -1 not met
*** Check failed: /local/src/NetBSD/src/tests/lib/libutil/t_parsedate.c:52:
parsedate("23jun2001", NULL, NULL) != -1 not met
*** Check failed: /local/src/NetBSD/src/tests/lib/libutil/t_parsedate.c:53:
parsedate("1-sep-06", NULL, NULL) != -1 not met
*** Check failed: /local/src/NetBSD/src/tests/lib/libutil/t_parsedate.c:54:
parsedate("1/11", NULL, NULL) != -1 not met
failed: 7 checks failed; see output for more details
The problem comes from the following code from parsedate() :
Julian += yyTimezone * 60L;
if (oJulian > Julian)
return -1;
oJulian = Julian;
which returns -1 for yyTimezone < 0 (actually -60 for Europe/Paris).
--
Nicolas Joly
Biological Software and Databanks.
Institut Pasteur, Paris.
From: Christos Zoulas <christos%zoulas.com@localhost>
To: Nicolas Joly <njoly%pasteur.fr@localhost>,
lib-bug-people%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: lib/44255: parsedate(3) fails with most samples strings from the
manpage
Date: Tue, 21 Dec 2010 13:13:18 -0500
On Dec 21, 4:11pm, njoly%pasteur.fr@localhost (Nicolas Joly) wrote:
-- Subject: Re: lib/44255: parsedate(3) fails with most samples strings from
Fixed, thanks.
christos
Home |
Main Index |
Thread Index |
Old Index