shiro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kao...@apache.org
Subject svn commit: r959528 - /incubator/shiro/trunk/web/src/main/java/org/apache/shiro/web/servlet/SimpleCookie.java
Date Thu, 01 Jul 2010 06:21:27 GMT
Author: kaosko
Date: Thu Jul  1 06:21:27 2010
New Revision: 959528

URL: http://svn.apache.org/viewvc?rev=959528&view=rev
Log:
FIXED - SHIRO-177: Wron SimpleCookie expires locale 
https://issues.apache.org/jira/browse/SHIRO-177
- Explicitly set dateformat to use US locale

Modified:
    incubator/shiro/trunk/web/src/main/java/org/apache/shiro/web/servlet/SimpleCookie.java

Modified: incubator/shiro/trunk/web/src/main/java/org/apache/shiro/web/servlet/SimpleCookie.java
URL: http://svn.apache.org/viewvc/incubator/shiro/trunk/web/src/main/java/org/apache/shiro/web/servlet/SimpleCookie.java?rev=959528&r1=959527&r2=959528&view=diff
==============================================================================
--- incubator/shiro/trunk/web/src/main/java/org/apache/shiro/web/servlet/SimpleCookie.java
(original)
+++ incubator/shiro/trunk/web/src/main/java/org/apache/shiro/web/servlet/SimpleCookie.java
Thu Jul  1 06:21:27 2010
@@ -28,6 +28,7 @@ import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.Date;
+import java.util.Locale;
 import java.util.TimeZone;
 
 /**
@@ -326,7 +327,7 @@ public class SimpleCookie implements Coo
      */
     private static String toCookieDate(Date date) {
         TimeZone tz = TimeZone.getTimeZone(GMT_TIME_ZONE_ID);
-        DateFormat fmt = new SimpleDateFormat(COOKIE_DATE_FORMAT_STRING);
+        DateFormat fmt = new SimpleDateFormat(COOKIE_DATE_FORMAT_STRING, Locale.US);
         fmt.setTimeZone(tz);
         return fmt.format(date);
     }



Mime
View raw message