if i turn on my computer i want that my desklight to be turned on, and if i quit computing i want it to turn off, for that i have the following:

and for off:

pretty much straight forward, no big deal and works like a charm.
only i want to extend it that if it is past sunset the light wil go on, otherwise not.
i tried several options like the one below but it doesnt work at all.

what may go wrong and can someone help me out here?