public static ZonedDateTime zonedDateTimeOf(final Calendar time) {
        return ZonedDateTime.ofInstant(time.toInstant(), time.getTimeZone().toZoneId());
    }
Gets ZonedDateTime for Calendar.

@param time Time object to be converted.
@return ZonedDateTime representing time
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java