(time, time_dictionary)
return False
time_dictionary will be of the format:
    {
        '*': [(begin_hour, end_hour), (begin_hour, end_hour), ...] catch all for days
        1: [(begin_hour, end_hour), ...] hours for Monday (Monday 1, Sunday 7)
    }
    All times UTC
time_dictionary will be of the format:
    {
        '*': [(begin_hour, end_hour), (begin_hour, end_hour), ...] catch all for days
        1: [(begin_hour, end_hour), ...] hours for Monday (Monday 1, Sunday 7)
    }
    All times UTC
time_dictionary will be of the format : { * : [ ( begin_hour end_hour ) ( begin_hour end_hour ) ... ] catch all for days 1 : [ ( begin_hour end_hour ) ... ] hours for Monday ( Monday 1 Sunday 7 ) } All times UTC
def time_in_range(time, time_dictionary):
    """time_dictionary will be of the format:
    {
        '*': [(begin_hour, end_hour), (begin_hour, end_hour), ...] catch all for days
        1: [(begin_hour, end_hour), ...] hours for Monday (Monday 1, Sunday 7)
    }
    All times UTC
    """

    if not time_dictionary:
        return True

    hours_for_today = time_dictionary.get(time.isoweekday())
    if not hours_for_today:
        hours_for_today = time_dictionary.get('*')

    for valid_hours in hours_for_today:
        if valid_hours[0] <= time.hour <= valid_hours[1]:
            return True

    return False
def time_in_range ( time , time_dictionary ) : if not time_dictionary : return True hours_for_today = time_dictionary . get ( time . isoweekday ( ) ) if not hours_for_today : hours_for_today = time_dictionary . get ( '*' ) for valid_hours in hours_for_today : if valid_hours [ 0 ] <= time . hour <= valid_hours [ 1 ] : return True return False