tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r763166 - /tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
Date Wed, 08 Apr 2009 10:18:00 GMT
Author: markt
Date: Wed Apr  8 10:17:59 2009
New Revision: 763166

URL: http://svn.apache.org/viewvc?rev=763166&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/trunk/java/org/apache/catalina/valves/AccessLogValve.java

Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=763166&r1=763165&r2=763166&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Wed Apr  8 10:17:59 2009
@@ -27,7 +27,6 @@
 import java.net.InetAddress;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
-import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
 import java.util.TimeZone;
@@ -857,8 +856,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)



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


Mime
View raw message