You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rodent of Unusual Size <CO...@PROCESS.COM> on 1997/11/09 17:50:00 UTC

[PATCH] Year-2000 for mod_include default timefmt

    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 ENDING_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 {

Re: [PATCH] Year-2000 for mod_include default timefmt

Posted by Ben Laurie <be...@algroup.co.uk>.
Rodent of Unusual Size wrote:
> 
>     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.

+1.

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686|Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |Apache-SSL author
A.L. Digital Ltd,     |http://www.algroup.co.uk/Apache-SSL
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Re: [PATCH] Year-2000 for mod_include default timefmt

Posted by Brian Behlendorf <br...@organic.com>.
At 12:50 PM 11/9/97 -0400, Rodent of Unusual Size wrote:
>    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.

+1.  heck, it's likely there'll be people running 0.6.4 in a couple of years.

	Brian


--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
"it's a big world, with lots of records to play." - sig   brian@organic.com

Re: [PATCH] Year-2000 for mod_include default timefmt

Posted by Dean Gaudet <dg...@arctic.org>.
+1

You want to handle that other y2k problem in suexec logging?

Dean

On Sun, 9 Nov 1997, Rodent of Unusual Size wrote:

>     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 ENDING_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 {
>