www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eduardo "Pérez" Ureta <epe...@dei.inf.uc3m.es>
Subject mod_autoindex/7710: The date from mod_autoindex is not the standard ISO 8601
Date Sat, 12 May 2001 11:48:06 GMT

>Number:         7710
>Category:       mod_autoindex
>Synopsis:       The date from mod_autoindex is not the standard ISO 8601
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Sat May 12 04:50:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     eperez@dei.inf.uc3m.es
>Release:        1.3.19
>Organization:
apache
>Environment:
all
>Description:
Apache should use the standard date format ISO 8601.
Apache should use gmtime instead of localtime.
If you don't live in the same timezone as the server how do you understand the date ?

For more information:
http://www.cl.cam.ac.uk/~mgk25/iso-time.html
>How-To-Repeat:

>Fix:
--- apache-1.3.19/contrib/mod_autoindex/mod_autoindex.c Fri Apr 13 16:26:13 2001
+++ apache-1.3.19/contrib/mod_autoindex/mod_autoindex.c Fri Apr 13 16:55:24 2001
@@ -1519,11 +1519,11 @@
        if (!(autoindex_opts & SUPPRESS_LAST_MOD)) {
             emit_link(r, "Last modified", K_LAST_MOD, keyid, direction,
                       static_columns);
-           ap_rputs("       ", r);
+           ap_rputs("        ", r);
        }
        if (!(autoindex_opts & SUPPRESS_SIZE)) {
             emit_link(r, "Size", K_SIZE, keyid, direction, static_columns);
-           ap_rputs("  ", r);
+           ap_rputs("   ", r);
        }
        if (!(autoindex_opts & SUPPRESS_DESC)) {
             emit_link(r, "Description", K_DESC, keyid, direction,
@@ -1597,13 +1597,13 @@
            if (!(autoindex_opts & SUPPRESS_LAST_MOD)) {
                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);
+                   struct tm *ts = gmtime(&ar[x]->lm);
+                   strftime(time_str, MAX_STRING_LEN, "%Y-%m-%dZ%H:%M:%S  ", ts);
                    ap_rputs(time_str, r);
                }
                else {
-                   /*Length="22-Feb-1998 23:42  " (see 4 lines above) */
-                   ap_rputs("                   ", r);
+                   /*Length="1998-02-22Z23:42:34  " (see 4 lines above) */
+                   ap_rputs("                     ", r);
                }
            }
            if (!(autoindex_opts & SUPPRESS_SIZE)) {
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]
 
 


Mime
View raw message