Adjusting iso8601SecondsDateParse to replace ' ' with 'T" in the same manner as iso8601DateParse

This commit is contained in:
Adam Lowe 2012-04-19 07:20:56 +01:00
parent 919f3ccc71
commit 7dbba2a4e1
1 changed files with 2 additions and 0 deletions

View File

@ -157,6 +157,8 @@ public class SimpleDateFormatDateService implements DateService {
toParse = trimToMillis(toParse); toParse = trimToMillis(toParse);
toParse = trimTZ(toParse); toParse = trimTZ(toParse);
toParse += tz; toParse += tz;
if (toParse.charAt(10) == ' ')
toParse = new StringBuilder(toParse).replace(10, 11, "T").toString();
synchronized (iso8601SecondsSimpleDateFormat) { synchronized (iso8601SecondsSimpleDateFormat) {
try { try {
return iso8601SecondsSimpleDateFormat.parse(toParse); return iso8601SecondsSimpleDateFormat.parse(toParse);