tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yuri Schimke <yuri.schi...@aqris.com>
Subject AccessLogValve.java - Missing +
Date Fri, 18 Jul 2003 14:02:08 GMT
Funkman, Thanks for fixing the timezone calculation bug.  I know I'm
just being picky now, but shouldn't positive timezone offsets have a
(redundant) '+' at the start.

>>From http://httpd.apache.org/docs/logs.html#common
        
        [10/Oct/2000:13:55:36 -0700] (%t)
                The time that the server finished processing the
                request. The format is: 
                        [day/month/year:hour:minute:second zone]
                        day = 2*digit
                        month = 3*letter
                        year = 4*digit
                        hour = 2*digit
                        minute = 2*digit
                        second = 2*digit
                        zone = (`+' | `-') 4*digit
                It is possible to have the time displayed in another
                format by specifying %{format}t in the log format
                string, where format is as in strftime(3) from the C
                standard library.
        

On Wed, 2003-07-09 at 02:12, funkman@apache.org wrote:

>    
>    
>   +    private String calculateTimeZoneOffset(long offset) {
>   +        StringBuffer tz = new StringBuffer();
>   +        if ((offset<0))  {
>   +            tz.append("-");
>   +            offset = -offset;
>   +        }
>   +
>   +        long hourOffset = offset/(1000*60*60);
>   +        long minuteOffset = (offset/(1000*60)) % 60;
>   +
>   +        if (hourOffset<10)
>   +            tz.append("0");
>   +        tz.append(hourOffset);
>   +
>   +        if (minuteOffset<10)
>   +            tz.append("0");
>   +        tz.append(minuteOffset);
>   +
>   +        return tz.toString();
>   +    }
>   +

--
Yuri Schimke
Aqris Software
+372 53 415 579

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


Mime
View raw message