]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
From: Arjan de Vet <Arjan.deVet@adv.IAEhv.nl>
authorwessels <>
Thu, 8 Jan 1998 05:45:23 +0000 (05:45 +0000)
committerwessels <>
Thu, 8 Jan 1998 05:45:23 +0000 (05:45 +0000)
Year-2000 (Y2K) fixes

lib/rfc1123.c
src/cachemgr.cc
src/debug.cc

index 85d51a505245501a0055887211e8b57ef7228af7..cc207895cce9e4b83a3926a52b8214d7c3f3031b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: rfc1123.c,v 1.12 1998/01/05 00:57:53 wessels Exp $
+ * $Id: rfc1123.c,v 1.13 1998/01/07 22:45:23 wessels Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -193,6 +193,12 @@ parse_rfc1123(const char *str)
            tm.tm_mday = make_num(s);
            tm.tm_mon = make_month(s + 3);
            tm.tm_year = make_num(s + 7);
+           /*
+            * Y2K: Arjan de Vet <Arjan.deVet@adv.IAEhv.nl>
+            * if tm.tm_year < 70, assume it's after the year 2000.
+            */
+           if (tm.tm_year < 70)
+               tm.tm_year += 100;
            tm.tm_hour = make_num(s + 10);
            tm.tm_min = make_num(s + 13);
            tm.tm_sec = make_num(s + 16);
index b33acd1b742f718482b1f3964079291f7fc063f7..e189eef16cbdedd153a07cd96560b937aaa37dc4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cachemgr.cc,v 1.65 1997/11/12 23:36:23 wessels Exp $
+ * $Id: cachemgr.cc,v 1.66 1998/01/07 22:45:25 wessels Exp $
  *
  * DEBUG: section 0     CGI Cache Manager
  * AUTHOR: Harvest Derived
@@ -317,16 +317,10 @@ static char *describeTimeSince(time_t then);
 static void
 print_trailer(void)
 {
-    static char tbuf[128];
-    struct tm *gmt;
-
-    gmt = gmtime(&now);
-    strftime(tbuf, 128, "%A, %d-%b-%y %H:%M:%S GMT", gmt);
-
     printf("<HR>\n");
     printf("<ADDRESS>\n");
     printf("Generated %s, by %s/%s@%s\n",
-       tbuf, progname, SQUID_VERSION, getfullhostname());
+       mkrfc1123(now), progname, SQUID_VERSION, getfullhostname());
     printf("</ADDRESS></BODY></HTML>\n");
 }
 
index b05ccb313122c71cd1f1b5a7928b53829adfd8ac..5d1ffdbe1f3b2ebc8a7f380df8b0c2d94bb2899d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: debug.cc,v 1.55 1998/01/05 21:44:40 wessels Exp $
+ * $Id: debug.cc,v 1.56 1998/01/07 22:45:25 wessels Exp $
  *
  * DEBUG: section 0     Debug Routines
  * AUTHOR: Harvest Derived
@@ -290,7 +290,7 @@ accessLogTime(time_t t)
     static time_t last_t = 0;
     if (t != last_t) {
        tm = localtime(&t);
-       strftime(buf, 127, "%y/%m/%d %H:%M:%S", tm);
+       strftime(buf, 127, "%Y/%m/%d %H:%M:%S", tm);
        last_t = t;
     }
     return buf;