You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Kalle Korhonen (JIRA)" <ji...@apache.org> on 2010/06/21 19:03:24 UTC

[jira] Assigned: (SHIRO-177) Wron SimpleCookie expires locale

     [ https://issues.apache.org/jira/browse/SHIRO-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kalle Korhonen reassigned SHIRO-177:
------------------------------------

    Assignee: Kalle Korhonen

> Wron SimpleCookie expires locale
> --------------------------------
>
>                 Key: SHIRO-177
>                 URL: https://issues.apache.org/jira/browse/SHIRO-177
>             Project: Shiro
>          Issue Type: Bug
>          Components: Session Management
>    Affects Versions: 0.9-RC1, 0.9, 1.0.0, 1.0.1, 1.1.0, Incubation
>         Environment: Windows XP, Jetty
>            Reporter: Vasily Shestkov
>            Assignee: Kalle Korhonen
>
> SimpleCookie.toCookieDate method to format cookie uses default locale. My default locale ru_RU. When browser receive cookie with expires formatted in non en_US locale, browser set cookie expires=session.
> Resolutiojon of this trouble is: 
>     private static String toCookieDate(Date date) {
>         TimeZone tz = TimeZone.getTimeZone(GMT_TIME_ZONE_ID);
>         DateFormat fmt = new SimpleDateFormat(COOKIE_DATE_FORMAT_STRING, Locale.US);
>         fmt.setTimeZone(tz);
>         return fmt.format(date);
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.