I need to parse specific date with joda library, I cant use an other library because its java 6 and we dont have another library available in module.
Anyway, I have this date :
2022-08-02T23:00:59Z
And I need to parse it for some operation after, but when I try to parse, I have this error :
java.lang.IllegalArgumentException: Invalid format: "2022-08-02T23:00:59Z" is malformed at "Z"
My code :
String pattern = "yyyy-MM-dd'T'HH:mm:ss";
String dateString="2022-08-02T23:00:59Z";
DateTimeFormatter date = DateTimeFormat.forPattern(pattern);
DateTime dateTIme = date.parseDateTime(dateString);
Maybe I make something wrong ?
I cannot found the good format for this pattern, so if anyone has idea, thank you very much