private String convert(String input) {
        String[] temp = input.split(":");
        Integer hour = Integer.parseInt(temp[0]);
        String minute =  temp[1];
        if (hour > 12) {
            // pm
            return (hour - 12) + ":" + minute + " PM";
        } else {
            return (hour.equals(0) ? "12" : hour ) + ":" + minute + " AM";
        }
    }