public static Date parseDate(String dateTime, String format, Date def) {
        Date date = def;
        try {
            DateFormat formatter = new SimpleDateFormat(format);
            date = formatter.parse(dateTime);
        } catch (Exception e) {
            DateFormat f = DateFormat.getDateInstance();
            try {
                date = f.parse(dateTime);
            } catch (Exception ee) {
                // ignore
            }
        }
        return date;
    }
parse date

@param dateTime   the string date time
@param format     the date format
@param def        the defalut date value
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/web/common/BaseResult.java