You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Sven Filatov <sv...@aqris.com> on 2003/03/28 14:35:48 UTC

[PATCH] For the bug report #18467

Index: catalina/src/share/org/apache/catalina/valves/AccessLogValve.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java,v
retrieving revision 1.3
diff -u -r1.3 AccessLogValve.java
--- catalina/src/share/org/apache/catalina/valves/AccessLogValve.java   
11 Jan 2003 05:12:48 -0000      1.3
+++ catalina/src/share/org/apache/catalina/valves/AccessLogValve.java   
28 Mar 2003 13:16:07 -0000
@@ -1028,10 +1028,8 @@

         // Initialize the timeZone, Date formatters, and currentDate
         TimeZone tz = TimeZone.getDefault();
-        timeZone = "" + (tz.getRawOffset() / (60 * 60 * 10));
-        if (timeZone.length() < 5)
-            timeZone = timeZone.substring(0, 1) + "0" +
-                timeZone.substring(1, timeZone.length());
+        SimpleDateFormat timeZoneFormatter = new SimpleDateFormat("Z");
+        timeZone = timeZoneFormatter.format(new Date());
         dateFormatter = new SimpleDateFormat("yyyy-MM-dd");
         dateFormatter.setTimeZone(tz);
         dayFormatter = new SimpleDateFormat("dd");



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