Skip to content

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Jul 15, 2019

The value of the zenith angle to calculate sunrise and sunset times is
commonly defined as 90°50', and is "obtained by adding the average
apparent radius of the Sun (16') to the average amount of atmospheric
refraction at the horizon (34')", according to
http://aa.usno.navy.mil/faq/docs/RST_defs.php.

This value is also used for the Sunrise/Sunset Algorithm published in
the Almanac for Computers, 1990, see
https://web.archive.org/web/20161202180207/http://williams.best.vwh.net/sunrise_sunset_algorithm.htm.

The value of the zenith angle to calculate sunrise and sunset times is
commonly defined as 90°50', and is "obtained by adding the average
apparent radius of the Sun (16') to the average amount of atmospheric
refraction at the horizon (34')", according to
http://aa.usno.navy.mil/faq/docs/RST_defs.php.

This value is also used for the Sunrise/Sunset Algorithm published in
the Almanac for Computers, 1990, see
https://web.archive.org/web/20161202180207/http://williams.best.vwh.net/sunrise_sunset_algorithm.htm.
@cmb69
Copy link
Member Author

cmb69 commented Jul 15, 2019

This is a revival of PR #3088, this time targeting PHP 8. @derickr, should be okay now?

PS: date_sun_info() now also uses the corrected zenith.

@derickr
Copy link
Member

derickr commented Jul 15, 2019

Yeah, I'm OK for that. I would also suggest we have a look at these defaults too: https://github.com/php/php-src/pull/4412/files#diff-7b738accc3d60f74c259da18588ddc5dR581

@cmb69
Copy link
Member Author

cmb69 commented Jul 15, 2019

@derickr, ah yes; see also https://externals.io/message/26033. I don't think that any default is particularly reasonable – should these ini settings be removed?

PS: especially doubtful, since the ini settings are not used for date_sun_info(), but only for date_sunrise() and date_sunset().

@cmb69
Copy link
Member Author

cmb69 commented Jul 15, 2019

Applied as 7556600. Thanks!

@cmb69 cmb69 closed this Jul 15, 2019
@cmb69 cmb69 deleted the fix-65547 branch July 15, 2019 11:53
@derickr
Copy link
Member

derickr commented Jul 16, 2019

Yes, they should be removed. I wrote date_sun_info() later, which really does more than the other two functions and I didn't feel like reimplementing that oddity again :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants