ropg / ezTime

ezTime — pronounced "Easy Time" — is a very easy to use Arduino time and date library that provides NTP network time lookups, extensive timezone support, formatted time and date strings, user events, millisecond precision and more.
MIT License
327 stars 92 forks source link

Request: Add sunrise / sunset calculation? #79

Closed MacSass closed 4 years ago

MacSass commented 4 years ago

Hello, I really like this library - it works great, and still compact.

I´m not sure if this is totally out of scope, but was wondering if you could consider to add calculation of sunrise / sunset for a given place in local time ...

Best regards and thanks for the nice library - MacSass

ropg commented 4 years ago

Glad you like it!

Hmmm, that sounds more like a library of its own: all it needs is time, the rest is more geo-coordinate calculations. Or it might be part of some existing geo-coordinate library already. But there's also services online (some even free) that will give that to you for any given city, usually in combination with a crude weather forecast.

I'll close this here, but keep it in mind just in case.

doanerock commented 4 years ago

I agree that sunrise/sunset it out os scope. Too many variables. https://www.timeanddate.com/astronomy/different-types-twilight.html

MacSass commented 4 years ago

Ok, I do agree - was not sure myself, although I was looking for sunrise / sunset (when sun crosses horizon) not twilights - guess I was just selfish as I found ezTime a great working lib :-) ...