when i remember corectly you have a variable in the enhanced skydome you are using wich tells you the “time of the day” the one that counts up to the DAY variable have you tried using that one?
you could export the sunrise and sundown variables from the skydome so the lamps can access it as well, that way you wont have to edit the variables by yourself.
And another idea for you to investigate would be to do the following.
Calculate the radius of pos 0,0,0 to the actual sunposition using simple math
sin(a) = A / C
Pos 1 (0,0,0) this is at a
Pos 2 (x,x,x) this is at b (upper right corner
A is simply the current vector of the sun * (0,0,1)
C is the VectorLength of Pos2-Pos1
now simply you want a you do asin(A / C)
and you get a acurate angle wich you can use to calculate
90°-0° day