@Override
            public void encode(final BsonWriter writer, final ZonedDateTime zonedDateTime, final EncoderContext encoderContext) {
                writer.writeTimestamp(new BsonTimestamp(DateTimeUtils.dateOf(zonedDateTime).getTime()));
            }
The type Zoned date time codec provider.
support/cas-server-support-mongo-core/src/main/java/org/apereo/cas/mongo/BaseConverters.java