Announcement

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

    Probably bug in RelativeDateItem – time value of CalculatedDateField

    Hi,

    using 3.1p.2012-11-25 with Firefox 16.0.

    Problem: CalculatedDateField (part of RelativeDateItem) shows unexpected time value.

    Windows settings:
    Timezone: (UTC-06:00) Central Time (US & Canada)
    DST activated (Automatically adjust clock for Daylight Saving Time)

    Globally set:
    Code:
    DateUtil.setDefaultDisplayTimezone("+01:00"); // emulates (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
    Item used in Dynamicform:
    Code:
    RelativeDateItem test = new RelativeDateItem("test");
    test.setType(FieldType.DATETIME.getValue());
    -------------------------------------------------------------------------------------------
    Use case 1:
    Code:
    DateUtil.setAdjustForDST(true);
    Typed into field: 03/30/2012 09:00:00
    Shows Calculated Value: 03/30/2012 02:00:00 -> wrong?
    Send to the server (after submitting form): 2012-03-30T07:00:00

    Typed into field: 03/20/2012 09:00:00
    Shows Calculated Value: 03/20/2012 02:00:00 -> wrong?
    Send to the server (after submitting form): 2012-03-20T07:00:00

    Typed into field: 03/10/2012 09:00:00
    Shows Calculated Value: 03/10/2012 02:00:00 -> wrong?
    Send to the server (after submitting form): 2012-03-10T08:00:00

    -------------------------------------------------------------------------------------------
    Use case 2:
    Code:
    DateUtil.setAdjustForDST(false);
    Typed into field: 03/30/2012 09:00:00
    Shows Calculated Value: 03/30/2012 03:00:00 -> wrong?
    Send to the server (after submitting form): 2012-03-30T08:00:00

    Typed into field: 03/20/2012 09:00:00
    Shows Calculated Value: 03/20/2012 03:00:00 -> wrong?
    Send to the server (after submitting form): 2012-03-20T08:00:00

    Typed into field: 03/10/2012 09:00:00
    Shows Calculated Value: 03/10/2012 02:00:00 -> wrong?
    Send to the server (after submitting form): 2012-03-10T08:00:00

    Is it a bug? If yes, when can be solved?
    Last edited by geletkaf; 5 Dec 2012, 08:40.

    #2
    As it happens, we just fixed a bug that probably has the same underlying cause. Can you test with the latest nightly patch build?

    Comment

    Working...
    X