Summary: | AccessLogValve incorrectly calculates timezone | ||
---|---|---|---|
Product: | Tomcat 4 | Reporter: | Jon Eaves <jon> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jt |
Priority: | P3 | ||
Version: | 4.1.30 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All |
Description
Jon Eaves
2003-05-31 05:15:50 UTC
Fixed in tomcat5. If ok - will eventually backport to 4.1 The offset still appears to be incorrect, though for a different reason that that originally reported: the timezone offset output does not include daylight saving. At the moment: x.x.x.x - - [25/Mar/2004:10:17:07 +0930] "GET / HTTP/1.1" 304 - should be reported as: x.x.x.x - - [25/Mar/2004:10:17:07 +1030] "GET / HTTP/1.1" 304 - Looking at org.apache.catalina.valves.AccessLogValve (4.1.30), line 1128 is: timeZone = calculateTimeZoneOffset(tz.getRawOffset()); I think this should use the TimeZone.getOffset() method instead, which returns the offset including DST. AFAICS from the CVS history the getRawOffset() method has always been used. Considering the length of time this has been in the source, either (a) I'm wrong, or (b) few people care. This has now been fixed in TC4.1.x and TC5.5.x For the record getOffset() can't be used (at least in TC4) as it is a JDK 1.4 method and TC4 has to work with JDK 1.2 |