From: df1986 at aol dot com Operating system: All PHP version: 5.4.19 Package: Date/time related Bug Type: Bug Bug description:Default value for sunrise/sunset zenith still wrong
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 bug report at https://bugs.php.net/bug.php?id=65547&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65547&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65547&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65547&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65547&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65547&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65547&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65547&r=needscript Try newer version: https://bugs.php.net/fix.php?id=65547&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=65547&r=support Expected behavior: https://bugs.php.net/fix.php?id=65547&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65547&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65547&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65547&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65547&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65547&r=dst IIS Stability: https://bugs.php.net/fix.php?id=65547&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=65547&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65547&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65547&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65547&r=mysqlcfg