From: wessels <> Date: Sat, 2 May 1998 04:37:14 +0000 (+0000) Subject: year-2000 fix (Henrik Nordstrom) X-Git-Tag: SQUID_3_0_PRE1~3397 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9bbc34cb51e22d6499b3609ec6bbda533c7ba67;p=thirdparty%2Fsquid.git year-2000 fix (Henrik Nordstrom) --- diff --git a/lib/iso3307.c b/lib/iso3307.c index 420cb59772..5aa7db4777 100644 --- a/lib/iso3307.c +++ b/lib/iso3307.c @@ -33,7 +33,8 @@ parse_iso3307_time(const char *buf) if ((int) strlen(buf) < 14) return 0; memset(&tms, '\0', sizeof(struct tm)); - tms.tm_year = (ASCII_DIGIT(buf[2]) * 10) + ASCII_DIGIT(buf[3]); + tms.tm_year = (ASCII_DIGIT(buf[0]) * 1000) + (ASCII_DIGIT(buf[1]) * 100) + + (ASCII_DIGIT(buf[2]) * 10) + ASCII_DIGIT(buf[3]) - 1900; tms.tm_mon = (ASCII_DIGIT(buf[4]) * 10) + ASCII_DIGIT(buf[5]) - 1; tms.tm_mday = (ASCII_DIGIT(buf[6]) * 10) + ASCII_DIGIT(buf[7]); tms.tm_hour = (ASCII_DIGIT(buf[8]) * 10) + ASCII_DIGIT(buf[9]);