You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Yuri Schimke <yu...@aqris.com> on 2003/07/18 16:02:08 UTC
AccessLogValve.java - Missing +
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
Re: AccessLogValve.java - Missing +
Posted by Tim Funk <fu...@joedog.org>.
Doh! Your right. ( If its supposed to mimic the apache's %t, which I think it
should)
-Tim
Yuri Schimke wrote:
> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org