Check if time is between two time inputs.

Thanks, but doesn't that also have issues?

Example I want to have lights on between 1900->0200

So timeOn 1900 and timeOFF at 0200.
At 2000 then both timeOFF and timeOn is smaller than time.