public static Date getDate( String date) throws AftershipAPIException,ParseException {
        SimpleDateFormat dateFormat;
        StringBuilder sb = new StringBuilder(date);
        Date newDate = null;
        if (sb.length() == 25) {
            dateFormat = new SimpleDateFormat(ISO8601Long);
            dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
            sb.deleteCharAt(22);
            newDate = dateFormat.parse(sb.toString());
            return newDate;
        } else{
            throw new AftershipAPIException("The date receive is not properly formatted yyyy-MM-dd'T'HH:mm:ssZ and is: "
                    +date);
        }
    }