def is_trans_time(self, dt):
    dt_time = dt.time()
    for transPeriod in self._day_periods:
        if ((dt_time >= transPeriod.start_time) and (dt_time <= transPeriod.end_time)):
            return True
    return False
def is_trans_time(self, dt):
    dt_time = dt.time()
    for transPeriod in self._day_periods:
        if ((dt_time >= transPeriod.start_time) and (dt_time <= transPeriod.end_time)):
            return True
    return False