This question already has an answer here:
I have this date: 2008-01-10T11:00:00-05:00
(date, T(separator), time, offset)
I have this: DateTimeFormatter.ofPattern("yyyy-MM-ddSEPARATORHH-mm-ssOFFSET")
I use this table to create my pattern.
But, I don't find how to note SEPARATOR
(T) and OFFSET.
For OFFSET exists this: x zone-offset offset-x +0000; -08; -0830; -08:30; -083015; -08:30:15;
, but don't know how to use x
to get -08:30
here is a little example that shows how to parse your
String
and receive the offset: