Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DateTimeItem problem with picking date across DST

    I'm having difficulty with the DateTimeItem when it used for selecting a date in the future that crosses the DST boundary. Here is a snippet of the code I'm using:

    Code:
    DynamicForm form = new DynamicForm();
    form.setWidth100();
    		
    ArrayList<FormItem> fields = new ArrayList<FormItem>();
    		
    DateTimeItem date = new DateTimeItem("time", "Time");
    date.setRequired(true);
    date.setUseTextField(true);
    date.setEndRow(true);
    fields.add(date);
    		
    form.setFields(fields.toArray(new FormItem[fields.size()]));
    When I use the control to select tomorrow (July 17) as a date, this is the display: 7/17/2010 00:00. All is well.

    When I use the control to select the day (November 8) after DST reverts back to Standard Time, this is the display: 11/8/2010 23:00. I expected the result to be: 11/8/2010 00:00.

    When I use the control to select the first day of 2011 (January 1), this is the display: 1/1/2010 23:00. Note the year is 2010 and the hour loss. I expected the result to be: 1/1/2011 00:00.

    Am I doing something wrong?

    Here's the environment I'm seeing this in:

    Java 1.6.0_18
    SmartGWTPower 2.2 (nightly build from approximately Jun 21 (supplied in training))
    Running in Eclipse Galieo development mode on Windows XP.
    Browsers: Firefox 3.6.6, Chrome 5.0.375.99, IE 8.

    #2
    I have this problem too. When will it be fixed?

    Comment


      #3
      This issue is now fixed (as of the next nightly build)
      See also DateUtils.setDefaultDisplayTimezone() and DateUtils.setAdjustForDST()

      Comment

      Working...
      X