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: [email protected]
For additional commands, e-mail: [email protected]