Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4
-
None
Description
I cannot see why this is failing but here is my code:
Date parseDate(String dateStr) {
Date d = null;
if (dateStr != null && ! "".equals(dateStr)) {
try {
// try to parse the date from ISO8601, general
formats, and RFC-2822
d = DateUtils.parseDate(dateStr, new String[]
);
} catch (ParseException e)
}
return d;
}
The string I am sending in to that method was generated like this:
String isoDateStr = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format(date);
The exception is:
2009-09-03 13:29:37,644 [399355530@qtp3-2] INFO
search.SOLRSearchService - Failed to parse:
2009-09-03T13:29:30+01:00:java.text.ParseException: Unable to parse
the date: 2009-09-03T13:29:30+01:00
java.text.ParseException: Unable to parse the date: 2009-09-03T13:29:30+01:00
at org.apache.commons.lang.time.DateUtils.parseDate(DateUtils.java:285)
at org.steeple.impl.search.SOLRSearchService.parseDate(SOLRSearchService.java:412)
at org.steeple.impl.search.SOLRSearchService.execute(SOLRSearchService.java:311)
....
Attachments
Attachments
Issue Links
- relates to
-
LANG-462 FastDateFormat supports parse
- Closed