I am trying to use java.time.format.DateTimeFormatter to parse dates like "2017-04-03 19:16:19 Etc/GMT" and getting java.time.format.DateTimeParseException: Text '2017-04-03 19:16:19 Etc/GMT' could not be parsed at index 20
Here is how my formatter is being initialized:
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss zzz");
At the same time, if date is as follows: "2017-04-03 19:16:19 Etc/UTC", everything works great.
I checked java.time.ZoneId.getAvailableZoneIds() - String "Etc/GMT" is in the list (technically, in the Set).
Any ideas?
"yyyy-MM-dd HH:mm:ss VV"DateTimeFormatteralready shows thatVis the format letter for matching named time zones, notz. Just delete the question.