public static long parseDateTime(String value) {
        try {
            if (value.length() < 8) {
                return -1;
            } else if (value.length() <= 9) {
                SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
                Date date = simpleDateFormat.parse(value.substring(0, 8));
                return new Timestamp(date.getTime()).getTime();
            } else if (value.length() <= 11) {
                SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHH");
                Date date = simpleDateFormat.parse(value.substring(0, 10));
                return new Timestamp(date.getTime()).getTime();
            } else {
                SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmm");
                Date date = simpleDateFormat.parse(value.substring(0, 12));
                return new Timestamp(date.getTime()).getTime();
            }
        } catch (ParseException e) {
            throw new IllegalArgumentException("Unexpected time format : " + value);
        }
    }
Parse date time form string format to unix format.
Only support <b>yyyyMMdd</b>, <b>yyyyMMddHH</b> and <b>yyyyMMddHHmm</b> precision
whose length is 8, 10 and 12 respectively.

@param value Date time in string format.
@return Unix date time.
inlong-common/src/main/java/org/apache/inlong/common/util/StringUtil.java