I am trying to parse the date which is in the format 2021-01-15T19:00:00+0000
. I am not sure which format it is but based on my research I tried with methods below
1. val odt = OffsetDateTime.parse("2021-01-15T19:00:00+0000")
2. val zdt = ZonedDateTime.parse("2021-01-15T19:00:00+0000")
It is logging the exception:
java.time.format.DateTimeParseException: Text '2021-01-15T19:00:00+0000' could not be parsed at index 19
at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1949)
at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851)
at java.time.ZonedDateTime.parse(ZonedDateTime.java:591)
at java.time.ZonedDateTime.parse(ZonedDateTime.java:576)