mikereedell / sunrisesunsetlib-java

Library for computing the sunrise/sunset from GPS coordinates and a date, in Java.
http://mikereedell.github.com/sunrisesunsetlib-java/
Apache License 2.0
299 stars 69 forks source link

Wrong sunset time for San Francisco #17

Closed apuder closed 6 years ago

apuder commented 8 years ago

[edited] Location location = new Location("37.739558", "-122.479749"); SunriseSunsetCalculator calculator = new SunriseSunsetCalculator(location, "America/Los_Angeles"); Calendar sunset = calculator.getCivilSunsetCalendarForDate(Calendar.getInstance());

For date 5/3 it reports 20:31. Actual sunset is 20:03.

MenoData commented 6 years ago

Late answer: You should select the method getOfficialSunsetCalendarForDate() instead. Then you will get close agreement with your expectation. That said, you had by mistake calculated civil twilight, not sunset. I suggest to close this issue.