Below is my code snippet and it is failing in my local but works in other DEV's machine, can someone give pointers on what am I missing?
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss a z");
ZonedDateTime releaseDate = ZonedDateTime
.parse("2021-03-31 10:15:30 AM +05:30", formatter);
Exception
java.time.format.DateTimeParseException: Text '2021-03-31 10:15:30 AM +05:30' could not be parsed at index 20
at java.base/java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:2046)
at java.base/java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1948)