Author: markt
Date: Thu Jun  4 14:33:47 2009
New Revision: 781753

URL: http://svn.apache.org/viewvc?rev=781753&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46982
Use DST offset not current offset (which will be 0 when DST is not being used)

Modified:
    
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java?rev=781753&r1=781752&r2=781753&view=diff
==============================================================================
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/valves/AccessLogValve.java
 Thu Jun  4 14:33:47 2009
@@ -26,7 +26,6 @@
 import java.net.InetAddress;
 import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
-import java.util.Calendar;
 import java.util.Date;
 import java.util.TimeZone;
 
@@ -1105,9 +1104,7 @@
 
         // Initialize the timeZone, Date formatters, and currentDate
         timezone = TimeZone.getDefault();
-        timeZoneNoDST = calculateTimeZoneOffset(timezone.getRawOffset());
-        Calendar calendar = Calendar.getInstance(timezone);
-        int offset = calendar.get(Calendar.DST_OFFSET);
+        int offset = timezone.getDSTSavings();
         timeZoneDST = calculateTimeZoneOffset(timezone.getRawOffset()+offset);
         
         if (fileDateFormat==null || fileDateFormat.length()==0)

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=781753&r1=781752&r2=781753&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Thu Jun  4 14:33:47 2009
@@ -119,6 +119,9 @@
         expiration. (markt)
       </fix>
       <fix>
+        <bug>46982</bug>: Fix DST problem with AccessLogValve. (markt)
+      </fix>
+      <fix>
         Improve handling of situation where web application tries to configure
         logging at the context level but the security policy prevents this.
         (markt/rjung)



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

Reply via email to