nathan-osman / go-sunrise

Go package for calculating the sunrise and sunset times for a given location
MIT License
145 stars 17 forks source link

Sometimes the sun never sets #6

Closed matslina closed 3 years ago

matslina commented 4 years ago

Hey, thanks for this library. Been using it to automatically dim a LED display overnight.

Wanted to mention that stuff breaks a bit for locations and times when/where the sun never sets. E.g.:

a, b := sunrise.SunriseSunset(69.3321443, -81.6781126, 2020, 6, 15)
fmt.Println("Igloolik, Canada:", a, b)

Produces Igloolik, Canada: 292277026596-12-04 15:30:08 +0000 UTC 292277026596-12-04 15:30:08 +0000 UTC. That looks a bit like time.Unix(1<<63-1, 0). Guessing this isn't intentional?

susannahameyer commented 3 months ago

Could we also distinguish between times when the sun doesn't rise vs. not setting to identify periods of continuous darkness or daylight?