private static String getTime(String time) {
        time = time.split(" ")[3];
        time = (Integer.parseInt(time.split(":")[0]) > 12 ? Integer.parseInt(time.split(":")[0])-12 :  time.split(":")[0]) + ":" +time.split(":")[1]
                +(Integer.parseInt(time.split(":")[0]) > 12 ? " PM" : " AM");
        return time;
    }