@Override
    public Object convert(Class destClass, Object srcObject) {
        Class<?> srcObjectClass = srcObject.getClass();

        if (Date.class.isAssignableFrom(srcObjectClass)) {
            Instant instant = ((Date) srcObject).toInstant();
            return instant;
        } else if (Instant.class.isAssignableFrom(srcObjectClass)) {
            return Instant.from((Instant) srcObject);
        } else if (TemporalAccessor.class.isAssignableFrom(srcObjectClass)) {
            return Instant.from((TemporalAccessor) srcObject);
        } else if (String.class.isAssignableFrom(srcObjectClass)) {
            return Instant.parse((String) srcObject);
        } else {
            throw new ConversionException(String.format("Unsupported source object type: %s", srcObjectClass), null);
        }
    }
Internal converter to {@link Instant} type. Only intended for internal use.
core/src/main/java/com/github/dozermapper/core/converters/InstantConverter.java