Page 1 of 1

Time range test

Posted: Wed Jun 06, 2018 2:42 pm
by gotsprings
I need a script to check the current time and then take action based on time.

I.E. If time is between 00:00:00-009:00:00 do
else

So this was my first guess.
:local timetest [/system clock get time]
:log info $timetest

:if ($timetest = 00:00:00-09:00:00) do={
    :log info TooEarly
} else= {
    :log info Late
}
I see the time output in the log like I should. But I think I have the wrong thing in the = to parameter.
Right now its 07:42:00 which shows in the log but the output reads "Late."

Sure its a syntax thing. Any help would be great.

Re: Time range test  [SOLVED]

Posted: Wed Jun 06, 2018 3:04 pm
by dasiu
if (($timetest>00:00:00) and ($timetest<09:00:00)) do={...

Re: Time range test

Posted: Wed Jun 06, 2018 3:06 pm
by gotsprings
Perfect! Thanks.