Check if time is within the selected range