]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - lib/rfc1123.c
2.1 branch merge
[thirdparty/squid.git] / lib / rfc1123.c
index 9b32aa25e6e39c4f0e1ed7f5378dd81ba590a20a..f9725e27afe87d7bd4b0d6d60b2989865db39f86 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: rfc1123.c,v 1.20 1998/07/22 20:36:37 wessels Exp $
+ * $Id: rfc1123.c,v 1.21 1998/11/12 06:30:15 wessels Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -43,6 +43,9 @@
 #if HAVE_STDIO_H
 #include <stdio.h>
 #endif
+#if HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
 #if HAVE_STRING_H
 #include <string.h>
 #endif
@@ -152,7 +155,8 @@ parse_rfc1123(const char *str)
            return -1;
        tm.tm_mday = make_num(s + 8);
        tm.tm_mon = make_month(s + 4);
-       tm.tm_year = make_num(s + 22);
+       /* Y2K fix, richard.kettlewell@kewill.com */
+       tm.tm_year = atoi(s + 20) - 1900;
        tm.tm_hour = make_num(s + 11);
        tm.tm_min = make_num(s + 14);
        tm.tm_sec = make_num(s + 17);