Condition between x time and y time

There is no such thing as a or “the” correct syntax. There’s many correct syntaxes and a gazillion possibilities. To select from these remains to be your task (and yours alone).
Check out this thread (there’s an OH3 one, too)