Time controlled light

I hope this helps you to understand what I want and figure out my mistake.

No, it doesn't, because hours and minutes are undefined and never valued.