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. DATETIMEFIELD.TXT
        2 kB
        Ryan Gravener
      2. dtf.patch
        2 kB
        Ryan Gravener

        Activity

        Ryan Gravener created issue -
        Hide
        Ryan Gravener added a comment -

        Enclosed is a patch.

        Show
        Ryan Gravener added a comment - Enclosed is a patch.
        Ryan Gravener made changes -
        Field Original Value New Value
        Attachment dtf.patch [ 12374421 ]
        Eelco Hillenius made changes -
        Fix Version/s 1.3.2 [ 12312942 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        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.
        Ryan Gravener made changes -
        Fix Version/s 1.4-M4 [ 12313295 ]
        Fix Version/s 1.3.2 [ 12312942 ]
        Fix Version/s 1.3.4 [ 12313089 ]
        Affects Version/s 1.3.4 [ 12313089 ]
        Affects Version/s 1.4-M3 [ 12312912 ]
        Affects Version/s 1.3.0-final [ 12312515 ]
        Ryan Gravener made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Ryan Gravener added a comment -

        updated patch.

        Show
        Ryan Gravener added a comment - updated patch.
        Ryan Gravener made changes -
        Attachment DATETIMEFIELD.TXT [ 12392203 ]
        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.
        Martijn Dashorst made changes -
        Fix Version/s 1.3.4 [ 12313089 ]
        Fix Version/s 1.3.6 [ 12313176 ]
        Frank Bille Jensen made changes -
        Fix Version/s 1.4-RC2 [ 12313495 ]
        Fix Version/s 1.4-RC1 [ 12313295 ]
        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
        Juergen Donnerstag made changes -
        Assignee Juergen Donnerstag [ jdonnerstag ]
        Fix Version/s 1.3.6 [ 12313176 ]
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development