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

Gabrielle Crawford resolved TRINIDAD-2266.
------------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.0-core
    
> DateConverter should keep hint consistent across server locales
> ---------------------------------------------------------------
>
>                 Key: TRINIDAD-2266
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2266
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 2.0.1-core
>            Reporter: Yee-Wah Lee
>            Priority: Trivial
>             Fix For: 2.1.0-core
>
>         Attachments: 121270_2266_thaiConverterHint.diff
>
>
> DateTimeConverter contains the following code for its default hint:
> static{
>  
>    Calendar dateFactory = Calendar.getInstance();
>     dateFactory.set(1998, 10, 29, 15, 45);
>     _EXAMPLE_DATE = dateFactory.getTime();
> }
> The (arbitrary) date of 1998 was chosen as a recent date, but not the current 
> date, so as not to confuse users when the converter is used in conjunction 
> with the validator. See comments on revision 499114.
> However, depending on the server locale, the Japanese Imperial or Thai 
> Buddhist calendar may be returned from Calendar.getInstance().  Calling set 
> (Calendar.YEAR, 1998) would result in a different date than the intended 
> (Gregorian)1998 date. For example, Thai Calendar is offset by 543 years, for 
> example, so the resulting Date is equivalent to 1455 Gregorian. 
> Suggest making the calendar instance specific to en_US, so that the example 
> date's year is always the locale-equivalent of (Gregorian) 1998.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to