geez man, he's already pointed you to that exact feature and you ignored him and posted again! BTW, what are you talking about setting a location - have you installed LMCE yet? Didn't you notice that it actually determines it location automatically and tells you on screen? It uses this (lat/long/etc) to determine your sunrise/set times automatically, and fires those events then ... just hook into the events and use them like he suggested...
just quick related question: can those calculated times be checked or seen somewhere ?
Do we have some state (day/night) that could queried after those events (sometimes you must query current state without waiting for events to happen) ?
Thanks in advance,