This looks like a perfectly normal ISO-8601 date/time to me. You should be able to parse it with either SimpleDateFormat
using the built-in APIs, or DateTimeFormatter
in Joda Time, using the pattern "yyyy-MM-dd'T'HH:mm:ssX"
(SimpleDateFormat) or "yyyy-MM-dd'T'HH:mm:ssZ"
(DateTimeFormatter
). Note that the "X" format symbol was only introduced into Java 7; if you need to do this in Java 6 or earlier you may need to strip the colon within the offset text (so -07:00
would become -0700
).
Personally I'd advise you to use Joda Time anyway - it gets round the Java version issue, and it's much nicer API in general.