tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 10730] New: - Time zone value in access log wrong for time zones east of Greenwich
Date Fri, 12 Jul 2002 10:48:08 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10730>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10730

Time zone value in access log wrong for time zones east of Greenwich

           Summary: Time zone value in access log wrong for time zones east
                    of Greenwich
           Product: Tomcat 4
           Version: 4.0.3 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: kurt.riede@web.de


The class org.apache.catalina.valvesAccessLogValve logs invalid time zoone 
values if the time zone is positiv (east to Greenwich).
This results from the assumption that (like in USA) the time zone is negative 
and so the related string representation starts with a minus sign. So for time 
zone values with a single digit hour, it is OK to insert a zero after the minus 
sign (after the first character), but for positive time zone values (like 
germany: plus one hour) this technic (inserting a zero after the first 
character) returns "1000" which means 10 hours. The reason is that the string 
representation doesn't contain the plus sign.

OK, so you have to handle the cases of positiv and negative tiomezones 
explicitly, i.e. like this:

OLD CODE of org/apache/catalina/valvesAccessLogValve.java:858

        if (timeZone.length() < 5)
            timeZone = timeZone.substring(0, 1) + "0" +
                timeZone.substring(1, timeZone.length());


NEW CODE of org/apache/catalina/valvesAccessLogValve.java:858

        if (this.timeZone.length() < 4) {
            this.timeZone = "0" + this.timeZone;
        } else if (this.timeZone.length() < 5) {
            timeZone = timeZone.substring(0, 1) + "0" +
                timeZone.substring(1, timeZone.length());
        }

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message