From: wessels <> Date: Wed, 22 Apr 1998 04:43:44 +0000 (+0000) Subject: re-fix parse_rfc1123() DT/ST bugs. Use the parsed time to generate X-Git-Tag: SQUID_3_0_PRE1~3472 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2d03c5fe99c70d769df0987b5b12a26380ffc42;p=thirdparty%2Fsquid.git re-fix parse_rfc1123() DT/ST bugs. Use the parsed time to generate the GMT offset. DONT use the current time, because it will be different for DT and ST. --- diff --git a/lib/rfc1123.c b/lib/rfc1123.c index 9c94f28f6e..bb9d179e58 100644 --- a/lib/rfc1123.c +++ b/lib/rfc1123.c @@ -1,6 +1,6 @@ /* - * $Id: rfc1123.c,v 1.15 1998/03/11 18:07:22 rousskov Exp $ + * $Id: rfc1123.c,v 1.16 1998/04/21 22:43:44 wessels Exp $ * * DEBUG: * AUTHOR: Harvest Derived @@ -243,15 +243,8 @@ parse_rfc1123(const char *str) #elif HAVE_TM_GMTOFF t = mktime(&tm); { - time_t cur_t = time(NULL); - struct tm *local = localtime(&cur_t); + struct tm *local = localtime(&t); t += local->tm_gmtoff; - /* - * The following assumes a fixed DST offset of 1 hour, - * which is probably wrong. - */ - if (tm.tm_isdst > 0) - t += 3600; } #else /* some systems do not have tm_gmtoff so we fake it */