Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-748

Client-side DateTimeRangeValidator does not handle differences in timezone


    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.2-core
    • Fix Version/s: 1.0.5-core, 1.2.4-core
    • Component/s: Components
    • Labels:


      Scenario: I'm using a DateTimeRangeValidator on an inputDate, with minimum bound to a Date, say, since today at midnight (Oct 1 2007 12:00:00 AM). The server is running in local time (Pacific/Los_Angeles). The client is running in America/New_York timezone.

      If client-side validation is disabled, the user can enter a string like "Oct 1 2007 12:00:01 AM" and that will submit successfully since the string is interpreted into the server's timezone and it is indeed greater than today's midnight.

      If client-side validation is enabled, the same string will fail. The error message is "Enter a date greater than or equal to Oct 1 2007 3:00:00 AM". This is because the client-side validator is interpreting the value in the local timezone, so "Oct 1 2007 12:00:01 AM EST". That is earlier than "Oct 1 2007 12:00:00 AM PDT", so it fails validation.

      The net result is, the values accepted are dependent on client-side validation being enabled, and whether the timezone adds/subtracts from the value so that it still falls within range.




            • Assignee:
              matzew Matthias We├čendorf
              yeelee Yee-Wah Lee
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: