getdate && Y2K
Mark Kettenis
kettenis@wins.uva.nl
Fri Dec 18 02:54:00 GMT 1998
From: Andreas Jaeger <aj@arthur.rhein-neckar.de>
Date: Fri, 18 Dec 1998 10:08:23 +0100 (CET)
Hi,
I've downloaded some Y2K test programs from:
ftp://ftp.rdg.opengroup.org/pub/unsupported/stdtools/y2k/
and got a segmentation fault using the getdate.c program :-(.
Could somebody check if either the testprogram (appended below) or the
getdate implementation in glibc2.1 is broken and fix it?
Thanks,
Andreas
On sparc-sun-solaris-2.5.1 the program segfaults too. But if I
uncomment the
#define TOG_END 38
it produces the output
getdate(3C) window: 2000-2037 1969-1999
So did you check the program with TOG_END set to 38? I wrote the
initial implementation of getdate in glibc2.1 and IIRC it uses
mktime(), which probably means that the implementation is limited to
dates up to Jan 1 2038 because of the size of time_t. Anyway if there
is a problem with getdate, I'll take a look at it over the weekend.
Mark
More information about the Libc-alpha
mailing list