@Override
    public String serialize(Date date) {
        switch (format) {
            case "MICROS": {
                long millis = date.getTime();
                long micros = TimeUnit.MILLISECONDS.toMicros(millis);
                return Long.toString(micros);
            }
            case "MILLIS": {
                long millis = date.getTime();
                return Long.toString(millis);
            }
            case "SECONDS": {
                long millis = date.getTime();
                long seconds = TimeUnit.MILLISECONDS.toSeconds(millis);
                return Long.toString(seconds);
            }
            default: {
                return FastDateFormat.getInstance(format).format(date.getTime());
            }
        }
    }
The format information for {@link Date}s.
inlong-common/src/main/java/org/apache/inlong/common/pojo/sort/dataflow/field/format/DateFormatInfo.java