-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[zend-date] fix calculating sunrise, sunset and twilight times
When php 8.1.0 deprecated date_sunset() and date_sunrise() functions, switched to recommended date_sun_info() function is used instead (which is available in php since v5.1) but that function yields slightly different results since zenith angles are internally fixed and they are different to what zf used before. (see $horizonDeclination in Zend_Date::calcSun() - moved from Zend_Date::_checkLocation()) Yet ONLY NOW they are accurate! (calculations for civil / nautical / astronomical twilight were totally wrong before) Still values returned by date_sun_info() are slightly different in php 8.0+, (but only for sunrise/sunset, not for twilight) so yet another set of conditions have to be added to test suites.
- Loading branch information
1 parent
dbe52f7
commit 1fcbccb
Showing
5 changed files
with
224 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.