From a33fada94408451bd5300b675221371a92047502 Mon Sep 17 00:00:00 2001 From: markt Date: Wed, 8 Apr 2009 10:17:59 +0000 Subject: [PATCH] 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) git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@763166 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/catalina/valves/AccessLogValve.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/java/org/apache/catalina/valves/AccessLogValve.java b/java/org/apache/catalina/valves/AccessLogValve.java index 0b7a2fce7..ebdef23c5 100644 --- a/java/org/apache/catalina/valves/AccessLogValve.java +++ b/java/org/apache/catalina/valves/AccessLogValve.java @@ -27,7 +27,6 @@ import java.io.PrintWriter; 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 @@ public class AccessLogValve // 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) -- 2.11.0