SunriseSunsetCalculator.getSunrise(...) accepts a degrees parameter which is documented as the "angle under the horizon for which to compute sunrise. For example, 'civil sunrise' corresponds to 6 degrees".
X degrees below the horizon corresponds to a solar zenith angle of 90 + X. But the implementation actually uses the opposite sign, and constructs new Zenith(90 - degrees), which is the zenith for the sun being degrees above the horizon, not below. So a caller asking for e.g. civil sunrise by passing degrees=6 would actually get the time at which the sun reaches 6° above the horizon.
Same problem is also present in SunriseSunsetCalculator.getSunset().
SunriseSunsetCalculator.getSunrise(...)accepts adegreesparameter which is documented as the "angle under the horizon for which to compute sunrise. For example, 'civil sunrise' corresponds to 6 degrees".X degrees below the horizon corresponds to a solar zenith angle of 90 + X. But the implementation actually uses the opposite sign, and constructs
new Zenith(90 - degrees), which is the zenith for the sun beingdegreesabove the horizon, not below. So a caller asking for e.g. civil sunrise by passing degrees=6 would actually get the time at which the sun reaches 6° above the horizon.Same problem is also present in
SunriseSunsetCalculator.getSunset().