Closed Broham closed 9 years ago
It returns times for the user's timezone.
Oh interesting, thanks for the info. So I created a Node.js api using this library and it is hosted on a heroku server (somewhere). Does this mean that where ever the server is hosted that the sun rose at 1:26 am and set at 3pm on May 14th, 2015? Why am I passing in a lat/long if it just uses the users timezone?
No, it means that if server sunrise is at 7:26am and it shows 1:26am to you, you have a 6 hour timezone difference between you and the server.
BTW there's already a Heroku SunCalc server here https://github.com/RandomEtc/suncalc-api
beautiful - thanks
I'm making a call to getTimes like below:
Which returns:
These times seem off - for example it has sunrise at
2015-05-14T01:26:51.946Z
which I'm reading as 1:26 am (correct?). Similarly night is2015-05-14T15:08:13.104Z
aka 3pm?Are the times returned for a specific time zone?