Always use en_US as locale for timestamps in
authorrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 11 Jul 2011 16:51:54 +0000 (16:51 +0000)
committerrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 11 Jul 2011 16:51:54 +0000 (16:51 +0000)
ExtendedAccessLogValve.

The format is specified in

http://www.w3.org/TR/WD-logfile.html

and states that the supported timestamps
"yyyy-MM-dd" and "HH:mm:ss" are defined with
ascii digits and GMT.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1145238 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/valves/ExtendedAccessLogValve.java
webapps/docs/changelog.xml

index da6aa52..53a33fd 100644 (file)
@@ -28,6 +28,7 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Locale;
 import java.util.TimeZone;
 
 import javax.servlet.http.Cookie;
@@ -875,7 +876,7 @@ public class ExtendedAccessLogValve extends AccessLogValve {
         private String currentTimestampString;
         
         ElementTimestampStruct(String format) {
-            currentTimestampFormat = new SimpleDateFormat(format);
+            currentTimestampFormat = new SimpleDateFormat(format, Locale.US);
             currentTimestampFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
         }
     }
index 7421da2..8033734 100644 (file)
       <fix>
         Log a failure if access log file cannot be opened. (kkolinko)
       </fix>
+      <fix>
+        Always use en_US as locale for timestamps in ExtendedAccessLogValve.
+        (rjung)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">