From 7dbba2a4e1aeafd4b075275f868eb236d6dfac38 Mon Sep 17 00:00:00 2001 From: Adam Lowe Date: Thu, 19 Apr 2012 07:20:56 +0100 Subject: [PATCH] Adjusting iso8601SecondsDateParse to replace ' ' with 'T" in the same manner as iso8601DateParse --- .../org/jclouds/date/internal/SimpleDateFormatDateService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/main/java/org/jclouds/date/internal/SimpleDateFormatDateService.java b/core/src/main/java/org/jclouds/date/internal/SimpleDateFormatDateService.java index 78b54a24d6..b6a0108dc8 100644 --- a/core/src/main/java/org/jclouds/date/internal/SimpleDateFormatDateService.java +++ b/core/src/main/java/org/jclouds/date/internal/SimpleDateFormatDateService.java @@ -157,6 +157,8 @@ public class SimpleDateFormatDateService implements DateService { toParse = trimToMillis(toParse); toParse = trimTZ(toParse); toParse += tz; + if (toParse.charAt(10) == ' ') + toParse = new StringBuilder(toParse).replace(10, 11, "T").toString(); synchronized (iso8601SecondsSimpleDateFormat) { try { return iso8601SecondsSimpleDateFormat.parse(toParse);