]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
re-fix parse_rfc1123() DT/ST bugs. Use the parsed time to generate
authorwessels <>
Wed, 22 Apr 1998 04:43:44 +0000 (04:43 +0000)
committerwessels <>
Wed, 22 Apr 1998 04:43:44 +0000 (04:43 +0000)
the GMT offset.  DONT use the current time, because it will be different
for DT and ST.

lib/rfc1123.c

index 9c94f28f6e5f18f5d7154b08fb188b65559aae11..bb9d179e58ae1626bc43cb64bc46151c00aa756d 100644 (file)
@@ -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 */