In case anyone else is having troubles using the DateTimeField (date picker
included in wicket-datetime) with dates on the day daylight savings time
begins (3/14/2010), I've created a Jira issue with a quickstart
demonstrating the problem:
https://issues.apache.org/jira/browse/WICKET-2763

Essentially, I'm having troubles with an exception being thrown when using a
DateTimeField. This is only happening on 3/14/2010 when the Hour field
contains a 2, regardless if it is AM or PM. I believe this is related to
daylight savings time starting at 2AM on 3/14/2010. Times between 2:00AM and
2:59AM don't exist, since at the moment 2:00AM happens, it is actually
3:00AM. This wouldn't be that big of a deal in my app for the 2AM times, but
it even causes an exception when the the date is set to 2PM, because the
logic is setting the JodaTime hour to 2 (not 14) before checking the AM/PM
setting.

Here is the exception:

Caused by: org.joda.time.
IllegalFieldValueException: Value 2 for hourOfDay is not supported: Illegal
instant due to time zone offset transition: 2010-03-14T02:00:00.000
(America/Los_Angeles)

At the moment, I'm using 24 hour mode instead of 12 hour mode so that the
only time there is an error is at 2AM and not also 2PM.

        DateTimeField start = new DateTimeField("start", new
PropertyModel<Date>(itemModel,"start")) {
            @Override
            protected boolean use12HourFormat() {
                return false;
            }
        };
        add(start);

Tauren

Reply via email to