The following jsp , with timezone set to "America/Los_Angeles" throws the following exception 5/8/07 10:34:33:045 EDT] 00000020 WebApp E [Servlet Error]-[/test.jsp]: java.text.ParseException: Unparseable date: "20070311 020000" at java.text.DateFormat.parse(DateFormat.java:352) at org.apache.taglibs.standard.tag.common.fmt.ParseDateSupport.doEndTag(Unk nown Source) at com.ibm._jsp._test._jspx_meth_fmt_parseDate_0(_test.java:99) In US, DST transition happened this year on 11th March at 01:59am, and thus the clocks were moved to 03:00am.So in US in year 2007 on March 11th, the time from 02:00am - 02:59 are invalid, as the time jumps from 01:59am to 03:00am. Especially when the dates are parsed in a non-lenient mode (setLenient(false)).In non-lenient mode, strict adherence will be followed, and DST tranisition hour is considered to be invalid Hence it would benefit if it possible to change the JSTL <fmt:parseDate> tag to set the lenient flag of the DateFormat object to 'true' -- or -- conversely provided a new tag attribute or setting to allow this behavior.
This is an issue in the Standard taglib rather than DateTime, so changing accordingly.
Something to decide here is whether this is something to report to the spec group.
Per the JSTL spec (1.0, 1.1 and 1.2), section 9.10: Parsing is non-lenient, i.e. the given date string must strictly adhere to the parsing format. So, the spec would need to change before something like this could be implemented in the Standard taglib.