is there a way to compare time values in scripts.
Say is the current time greater than 17:00:00.
I tried this.
:if ([/system clock get time] > "17:00:00") do={}
but is always returns false.
Thanks for any help.
Try this one (routerOS v 2.9):is there a way to compare time values in scripts.
Say is the current time greater than 17:00:00.
I tried this.
:if ([/system clock get time] > "17:00:00") do={}
but is always returns false.
Thanks for any help.
:set hours [:tonum [:pick[/system clock get time]0 2]]
:set min [:tonum [:pick[/system clock get time]3 5]]
:set sec [:tonum [:pick[/system clock get time]6 8]]
:set a ($hours*3600 + $min*60 + $sec)
:set b 61200
:if ($a>=$b) do={}
:if ($a<$b) do={}