Wicket
  1. Wicket
  2. WICKET-1314

DateTimeField does not correct the timezone properly

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.4, 1.4-M3
    • Fix Version/s: 1.4-RC2
    • Component/s: wicket-datetime
    • Labels:
      None

      Description

      The DateTimeField has a DateTextField which uses a styledateconverter with timezone correction set to true which is not needed since the DateTimeField accounts for the TimeZone correction. Another problem is that the DateTimeField only sets the timezone of the date (from local->client), causing the date to be corrected to the local time. This should instead cause the local time to reflect that of the clients time.

      1. dtf.patch
        2 kB
        Ryan Gravener
      2. DATETIMEFIELD.TXT
        2 kB
        Ryan Gravener

        Activity

        Hide
        Ryan Gravener added a comment -

        Enclosed is a patch.

        Show
        Ryan Gravener added a comment - Enclosed is a patch.
        Hide
        Ryan Gravener added a comment -

        Need to correct the time in the onBeforeRender as well.

        Show
        Ryan Gravener added a comment - Need to correct the time in the onBeforeRender as well.
        Hide
        Ryan Gravener added a comment -

        updated patch.

        Show
        Ryan Gravener added a comment - updated patch.
        Hide
        Martijn Dashorst added a comment -

        can't fix an already released release.

        Show
        Martijn Dashorst added a comment - can't fix an already released release.
        Hide
        Timo Rantalaiho added a comment -

        Ryan (or others), could you maybe explain in an easy way what impact does this have? I looked at the current code and the patch, but don't understand what effect does changing the timezone of the date being edited have (I'm just getting the same date value displayed before and after the patch).

        Show
        Timo Rantalaiho added a comment - Ryan (or others), could you maybe explain in an easy way what impact does this have? I looked at the current code and the patch, but don't understand what effect does changing the timezone of the date being edited have (I'm just getting the same date value displayed before and after the patch).
        Hide
        Ryan Gravener added a comment -

        If your server is EST and the client is PST, it will convert server time-> local time when data is displayed to the user and local time-> server time when the user posts data. In order to test this, you need two operating systems running. Change the timezone on each and run the server on one, and use your browser on the other. Also make sure you gather extended browser information http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/settings/IRequestCycleSettings.html

        Show
        Ryan Gravener added a comment - If your server is EST and the client is PST, it will convert server time-> local time when data is displayed to the user and local time-> server time when the user posts data. In order to test this, you need two operating systems running. Change the timezone on each and run the server on one, and use your browser on the other. Also make sure you gather extended browser information http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/settings/IRequestCycleSettings.html
        Hide
        Juergen Donnerstag added a comment -

        thanks

        Show
        Juergen Donnerstag added a comment - thanks

          People

          • Assignee:
            Juergen Donnerstag
            Reporter:
            Ryan Gravener
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development