The __desc__ field of **begin[end]_weekend** suggests
sunday is the prevailing start of the week, whereas the
Python implementation says no.
See https://stackoverflow.com/questions/
21045569/why-is-pythons-weekday-different-from-tm-wday-in-c
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
def time_permit(self):
local_time = time.localtime()
time_of_day = time.strftime('%H%M', local_time)
- weekday = local_time.tm_wday
+ weekday = (local_time.tm_wday + 1) % 7 # be compatible with C
permit = False
begin_time = self.get_module_option('begin_time')