Page 1 of 1

systime, again!

Posted: 26 May 2021, 23:35
by GG42
Why this condition does not work any more?

" if %systime%>00:40:00 and %systime%<21:14:00 "

My script works within and OUT of this time condition. It seems it works well in the past, what happens?
Thank you for your help.

Re: systime, again!

Posted: 27 May 2021, 06:07
by ThomasB
The rule condition you posted requires system time to have been retrieved (e.g. WiFi successfully connected to NTP). Also Tools->Advanced->Timezone Offset UTC must be correctly set. Otherwise %systime% value won't be valid.

FWIW, In case there is a logic issue I suggest posting the entire rule page so the experts can review it.

- Thomas

Re: systime, again!

Posted: 27 May 2021, 08:58
by TD-er
Apart from Thomas' suggestion about the time which must be set (e.g. this check will probably not work at the boot event), can you try to split the line in two lines and create a logentry to check the time check is working for at least one compare?

See: https://espeasy.readthedocs.io/en/lates ... .html#time

Another check could be to check with the %syssec_d% variable (number of seconds of today)
Just to see if there may be an issue with the time parsing.

What build are you running?