Bug #65547 [Ver->Csd]: Default value for sunrise/sunset zenith still wrong
| From: | cmb@php.net | Date: | Mon, 15 Jul 2019 11:52:39 +0000 |
| Subject: | Bug #65547 [Ver->Csd]: Default value for sunrise/sunset zenith still wrong | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-221780@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65547&edit=1
ID: 65547
Updated by: cmb@php.net
Reported by: df1986 at aol dot com
Summary: Default value for sunrise/sunset zenith still wrong
-Status: Verified
+Status: Closed
Type: Bug
Package: Date/time related
Operating System: All
PHP Version: 5.4.19
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7556600dfc80e9a11db538ce58cb249d6cdda7b3
Log: Fix #65547: Default value for sunrise/sunset zenith still wrong
Previous Comments:
------------------------------------------------------------------------
[2019-07-15 08:46:01] cmb@php.net
The following pull request has been associated:
Patch Name: Fix #65547: Default value for sunrise/sunset zenith still wrong
On GitHub: https://github.com/php/php-src/pull/4412
Patch: https://github.com/php/php-src/pull/4412.patch
------------------------------------------------------------------------
[2018-02-08 17:16:02] cmb@php.net
Yes, you're right.
<http://aa.usno.navy.mil/faq/docs/RST_defs.php>
explains why it
should be 90° 50'.
------------------------------------------------------------------------
[2013-08-25 09:31:04] df1986 at aol dot com
Description:
------------
I have discovered https://bugs.php.net/bug.php?id=49448 this bug
report filed
several years ago which, quite correctly, points out that php's default zenith
is 90 + 35/60.
However, the official algorithm from the 1990 Almanac for Computers published by
the Nautical Almanac Office at the United States Naval Observatory (which can be
found at http://williams.best.vwh.net/sunrise_sunset_algorithm.htm)
quite
clearly says that the correct value is 90+50/60.
The old bug was closed as bogus with a message saying that "the algorithm code
we use clearly says 35/60". That statement is nothing more than a tautology. It
says "the code should be 35/60 because if you look at the code, it says 35/60",
and does nothing to answer where this value came from, or why it differs from
the canonical value. Some commenters had noted this, but there was no response.
As such, I'd like to reopen this bug and see it correctly fixed, rather than
simply swept under the carpet.
Test script:
---------------
echo ini_get("date.sunset_zenith"), "\n",
ini_get("date.sunrise_zenith"), "\n", (90 + 50/60), "\n";
Expected result:
----------------
90.833333333333
90.833333333333
90.833333333333
Actual result:
--------------
90.583333
90.583333
90.833333333333
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65547&edit=1