From wjones@tc.fluke.com Thu Jan 6 07:49:29 2000 Date: Wed, 5 Jan 2000 20:22:55 -0800 From: Warren Jones To: htdig3-dev@htdig.org Subject: [htdig3-dev] Y2K patch I have to deal with a web server that returns dates with a two digit year field. Debugging output from htdig version 3.1.4 looks like this: Header line: Last-modified: Thursday, 06-Jan-00 00:12:52 GMT Translated Thursday, 06-Jan-00 00:12:52 GMT to 06 Jan 1900 00:12:52 (0) And converted to Wed, 31 Dec 1969 23:59:59 ^^^^ bogosity I know the web server is broken, but I'm not in a position to fix it. Hope the following patch to strptime.cc will help others in the same situation. -- Warren Jones M/S 279F wjones@tc.fluke.com Fluke Corporation phone: (425) 356-5934 PO Box 9090, Everett, WA, USA 98206-9090 Fax: (425) 356-5043 Index: strptime.cc =================================================================== RCS file: /home/wjones/src/CVS.repo/htdig/htlib/strptime.cc,v retrieving revision 1.1.1.1 diff -c -r1.1.1.1 strptime.cc *** strptime.cc 1997/01/17 20:35:38 1.1.1.1 --- strptime.cc 2000/01/06 04:00:09 *************** *** 348,353 **** --- 348,355 ---- i *= 10; i += *buf - '0'; } + if (c == 'y' && i<70) // Y2K windowing kludge + i += 100; if (c == 'Y') i -= 1900; if (i < 0) ------------------------------------ To unsubscribe from the htdig3-dev mailing list, send a message to htdig3-dev-unsubscribe@htdig.org You will receive a message to confirm this.