@Override
            public Long toType(Config config, Date orig) {
                Long unixTimeMillis = Timestamp.fromLogical(Timestamp.SCHEMA, orig);
                switch (config.unixPrecision) {
                    case UNIX_PRECISION_SECONDS:
                        return TimeUnit.MILLISECONDS.toSeconds(unixTimeMillis);
                    case UNIX_PRECISION_MICROS:
                        return TimeUnit.MILLISECONDS.toMicros(unixTimeMillis);
                    case UNIX_PRECISION_NANOS:
                        return TimeUnit.MILLISECONDS.toNanos(unixTimeMillis);
                    case UNIX_PRECISION_MILLIS:
                    default:
                        return unixTimeMillis;
                }
            }
Convert from the universal java.util.Date format to the type-specific format
connect/transforms/src/main/java/org/apache/kafka/connect/transforms/TimestampConverter.java