private boolean matchesTime(TimeRestrictedAccess filter) {
        OffsetDateTime start = filter.getTimeStart();
        OffsetDateTime end = filter.getTimeEnd();
        if (end == null || start == null) {
            return true;
        }
        long startMs = start.toEpochSecond();
        long endMs = end.toEpochSecond();
        OffsetDateTime currentTime = OffsetTime.now().atDate(LocalDate.ofInstant(Instant.EPOCH, ZoneOffset.UTC));
        long nowMs = currentTime.toEpochSecond();

        return nowMs >= startMs && nowMs < endMs;
    }
Returns true if the given DateTime matches the time range indicated by the
filter/rule.
gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/TimeRestrictedAccessPolicy.java