private boolean matchesTime(TimeRestrictedAccess filter) {
        Date start = filter.getTimeStart();
        Date end = filter.getTimeEnd();
        if (end == null || start == null) {
            return true;
        }
        long startMs = start.getTime();
        long endMs = end.getTime();
        DateTime currentTime = new LocalTime(DateTimeZone.UTC).toDateTime(new DateTime(0l));
        long nowMs = currentTime.toDate().getTime();
        
        return nowMs >= startMs && nowMs < endMs;
    }
private boolean matchesTime ( TimeRestrictedAccess filter ) { Date start = filter . getTimeStart ( ) ; Date end = filter . getTimeEnd ( ) ; if ( end == null || start == null ) { return true ; } long startMs = start . getTime ( ) ; long endMs = end . getTime ( ) ; DateTime currentTime = new LocalTime ( DateTimeZone . UTC ) . toDateTime ( new DateTime ( 0l ) ) ; long nowMs = currentTime . toDate ( ) . getTime ( ) ; return nowMs >= startMs && nowMs < endMs ; }
Returns true if the given DateTime matches the time range indicated by the
filter/rule.
@param currentTime
@param filter