Time range test

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.

if (($timetest>00:00:00) and ($timetest<09:00:00)) do={...

Perfect! Thanks.