Hello

I try to drive a relay between two Times, but with my code it not work
right if the mute_ini time >= 0...

The mute_ini and mute_end i want choose idependently from 0 to 23
A example what i want like this:
rtchr = 23 mute_ini = 0 mute_end = 8
rtchr = 23 mute_ini = 2 mute_end = 8
rtchr = 20 mute_ini = 0 mute_end = 6



driverelay:
gosub gettime 'read the hour from rtc1307
tmp_rtc = rtchr + 1
if (tmp_rtc <= mute_ini) and (rtchr >= mute_end) then 'not correct
' relay on = play
else
' relay off = mute
endif
Return

Can anyone help with this code?

Thanks in advance
Regards
Pedro