string of format 2018-11-26T15:12:03.000-0800 to java.time.localdatetime of format "M/dd/yy HH:mm:ss a z" conversion throwing exception : i wrote an util function to convert a string time value of format 2018-11-26T15:12:03.000-0800 to localdatetime of format  "M/dd/yy HH:mm:ss a z" and then save in to db. the save part is not part of the util function.

 
string of format 2018-11-26T15:12:03.000-0800 to java.time.localdatetime of format "M/dd/yy HH:mm:ss a z"  conversion throwing exception 
public static LocalDateTime convertStringToTime(String time){

        String pattern = "M/dd/yy HH:mm z";
        DateTimeFormatter formatter =  DateTimeFormatter.ofPattern(pattern);
        ZonedDateTime zonedDateTime = ZonedDateTime.parse(time,formatter);
        return zonedDateTime.toLocalDateTime();
    }
which gives me the below  exception
java.time.format.DateTimeParseException: Text '2018-11-26T12:45:23.000-0800' could not be parsed at index 4
	at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1947)