protected boolean doesEndingTimeAllowServiceAccess() {
        val endDateTime = getEndingDateTime();
        if (endDateTime != null) {
            val et = DateTimeUtils.zonedDateTimeOf(endDateTime);
            if (et != null) {
                val now = ZonedDateTime.now(ZoneId.of(getZoneId()));
                if (now.isAfter(et)) {
                    LOGGER.warn("Service access not allowed because it ended at [{}]. Now is [{}]", endDateTime, now);
                    return false;
                }
            } else {
                val etLocal = DateTimeUtils.localDateTimeOf(endDateTime);
                if (etLocal != null) {
                    val now = LocalDateTime.now(ZoneId.of(getZoneId()));
                    if (now.isAfter(etLocal)) {
                        LOGGER.warn("Service access not allowed because it ended at [{}]. Now is [{}]", endDateTime, now);
                        return false;
                    }
                }
            }
        }
        return true;
    }
Does ending time allow service access boolean.

@return true/false
core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/TimeBasedRegisteredServiceAccessStrategy.java