Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2974

Date Conversion doesnt use client Locale

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.1.6
    • None
    • Value Stack
    • None
    • Win 2003 Server (Server side) + Tomcat 6.0.18 + Win XP SP 2 (Client side) + FF 3.0.4 + IE 7

    Description

      Datetime values are not correctly converted when the client locale is different from server locale.

      Example:

      Client locale: pt (portuguese) -> The date time format here is "dd/MM/yyyy"
      Server locale: en (english)

      When a form is submitted with the value "25/12/2008" (25 december 2008, according "pt" Locale) struts returns a conversion error "Invalid field value for field XXXXX".

      When a form is submitted with the value "05/02/2008" (5 February 2008, according "pt" Locale) no input error, but the value in the ValueStack will be 2 May 2008... month and day INVERTED!

      I tried to put the parameter "request_locale" with "pt" and "pt_BR" and "pt-BR" values, but... the same error.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jyoshiriro José Yoshiriro
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: