public static LocalDateTime parseDate(String dateStr) {
        if (StringUtils.isBlank(dateStr)) {
            return null;
        }
        ZonedDateTime zonedDateTime = null;
        try {
            zonedDateTime = ZonedDateTime.parse(dateStr,
                    DateTimeFormatter.ofPattern("yyyy-MM-dd['T'][' ']HH:mm:ss[.SSS][XXX][Z]"));
            return LocalDateTime.ofInstant(zonedDateTime.toInstant(), ZoneId.systemDefault());
        } catch (DateTimeParseException ignored) {
            String[] patterns = new String[]{"yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd", "yyyyMMdd"};
            for (String pattern : patterns) {
                try {
                    return LocalDateTime.parse(dateStr, DateTimeFormatter.ofPattern(pattern));
                } catch (DateTimeParseException ignored2) {
                }
            }
        }
        return null;
    }
if raw data has field like create_date or create_time, give it to default partition field.
or give first timestamp or date type field value to default partition field

@param rawData row data
@param schema flink field types
@param partitionPolicy partition policy
@param partitionField partition field
@param timestampPattern timestamp pattern
@return default partition value
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/hive/src/main/java/org/apache/inlong/sort/hive/util/HiveTableUtil.java