public static long fromLogical(Schema schema, java.util.Date value) {
        if (!(LOGICAL_NAME.equals(schema.name())))
            throw new DataException("Requested conversion of Timestamp object but the schema does not match.");
        return value.getTime();
    }
Convert a value from its logical format ({@link java.util.Date}) to its encoded format (long).
@param value the logical value
@return the encoded value
connect/api/src/main/java/org/apache/kafka/connect/data/Timestamp.java