Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 6160 invoked by uid 6000); 9 Nov 1997 17:51:34 -0000 Received: (qmail 6152 invoked from network); 9 Nov 1997 17:51:32 -0000 Received: from alcor.process.com (192.42.95.16) by taz.hyperreal.org with SMTP; 9 Nov 1997 17:51:32 -0000 Date: Sun, 9 Nov 1997 12:50 -0400 From: COAR@PROCESS.COM (Rodent of Unusual Size) Message-Id: <009BD0968F8EF65B.59B0@PROCESS.COM> To: New-HTTPd@Apache.Org Subject: [PATCH] Year-2000 for mod_include default timefmt X-VMS-To: NH X-VMS-Cc: COAR Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org We claim that Apache is Y2K compliant, and it is - on a binary level. However, a couple of our default date displays only use 2 digits for the year: mod_include and mod_autoindex. Since we're still in beta, and there's a reasonable chance 1.3 will still be around (somewhere) in a couple of years, I'd like to propose the attached patch for inclusion in 1.3b3. #ken P-)} Index: mod_include.c =================================================================== RCS file: /export/home/cvs/apachen/src/modules/standard/mod_include.c,v retrieving revision 1.57 diff -u -r1.57 mod_include.c --- mod_include.c 1997/10/22 20:30:22 1.57 +++ mod_include.c 1997/11/09 17:49:47 @@ -92,7 +92,7 @@ #define STARTING_SEQUENCE "" #define DEFAULT_ERROR_MSG "[an error occurred while processing this directive]" -#define DEFAULT_TIME_FORMAT "%A, %d-%b-%y %H:%M:%S %Z" +#define DEFAULT_TIME_FORMAT "%A, %d-%b-%Y %H:%M:%S %Z" #define SIZEFMT_BYTES 0 #define SIZEFMT_KMG 1 Index: mod_autoindex.c =================================================================== RCS file: /export/home/cvs/apachen/src/modules/standard/mod_autoindex.c,v retrieving revision 1.54 diff -u -r1.54 mod_autoindex.c --- mod_autoindex.c 1997/11/09 05:49:21 1.54 +++ mod_autoindex.c 1997/11/09 17:49:48 @@ -707,7 +707,7 @@ register int x; if (autoindex_opts & SUPPRESS_LAST_MOD) - maxsize += 17; + maxsize += 19; if (autoindex_opts & SUPPRESS_SIZE) maxsize += 7; @@ -800,7 +800,7 @@ if (!(autoindex_opts & SUPPRESS_LAST_MOD)) { emit_link(r, "Last modified", K_LAST_MOD, keyid, direction, static_columns); - rputs(" ", r); + rputs(" ", r); } if (!(autoindex_opts & SUPPRESS_SIZE)) { emit_link(r, "Size", K_SIZE, keyid, direction, static_columns); @@ -881,7 +881,7 @@ if (ar[x]->lm != -1) { char time_str[MAX_STRING_LEN]; struct tm *ts = localtime(&ar[x]->lm); - strftime(time_str, MAX_STRING_LEN, "%d-%b-%y %H:%M ", ts); + strftime(time_str, MAX_STRING_LEN, "%d-%b-%Y %H:%M ", ts); rputs(time_str, r); } else {