You did not say exactly what it is that's not working...but I can see a problem with the lines where you are testing two static conditions and then sending X10 commands. This would cause it to send those X10 commands repeatedly over and over, appearing to jam the powerline with X10 commands. It would also restart the timer over and over.
If one condition always happens before the other then you can make the later one a "becomes" like this (example variable #7 becoming = 1):
IF Variable #4 = 1 AND Variable #7 becomes = 1 THEN (send X10...) THEN (start timer...)
If either one can occur first (ie: if it's getting dark early or if it's 16:00) then you need to test for both possibilities and then set a flag to execute the commands only once by testing for the flag becoming set in separate statements and then immediately resetting the flag (ex Variable 99) :
IF Variable #4 = 1 AND Variable #7 becomes = 1 THEN Varaible #99 = 1
IF Variable #7 = 1 AND Variable #4 becomes = 1 THEN Variable #99 = 1
IF Variable #99 becomes = 1 THEN (send X10...) THEN (start timer...) THEN Variable #99 = 0
"If you don't know what you're doing, do it neatly..."