There are some handy utils for un*x systems that can do the task of calculating sunrise/sunset/civil twilight/etc times given a latitude and longitude input. Unfortunately I was not able to locate any win32 console apps that can do this reliably. I found one written by an author who is no longer reachable and his contains a daylight-savings bug (DST calculation doesn't seem to work). Daylight savings is a very important and tricky factor.
The reason I would like to have such a program is to use it in batch files to schedule home automation tasks such as turning out outside lights, controlling thermostat settings etc, based on sunrise/sunset/twilight times which change each day.
As a starting point you might consider the following URLs for assistance with the algorithms:
there are others but that is a start...
will anyone be so kind as to create this program?? all it needs to do is output the time in 24hour hh:mm format, no fancy GUI is needed (at least for me!). It would be good if it can accept some commandline arguments such as specifying a date manually (default would be todays date) and also the ability to output only the time you need for example just the SUNRISE time.
>suntime.exe 40.734N 73.986W -time sunrise
>suntime.exe 40.734N 73.986W -time sunset
>suntime.exe 40.734N 73.986W -time twilight