For my application I am searching for an API or an algorithm for clicking point time and time zone. I dont know how I can do this but after getting time I want to calculate giving coordinate sun rise/set time... I prefer python but javascript is okay.

I know EarthTools gives the information you need but I want to use it for local needs. In EarthTools I noticed that the given time is wrong, it is approximately one hour back...

Thank you in advance.

  • 1
    The 1 hour difference could be because of daylight savings time. It is done country by country, and even state by state. – mhoran_psprep Mar 28 '12 at 12:40

I have used this sun rise algorithm based on the one for the US Naval Observatory in the past. It does a good job of explaining the steps. Over the years I have used it in C, C++, VBA, Python...

  • is it only sun rise/set code and can i get current time when i click any location? – Aragon Mar 28 '12 at 13:44
  • do you have a shapefile (or some other file type) that has the time zone bounds? – mhoran_psprep Mar 28 '12 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.