|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65547 Default value for sunrise/sunset zenith still wrong
Submitted: 2013-08-25 09:31 UTC Modified: 2018-02-08 17:16 UTC
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: df1986 at aol dot com Assigned:
Status: Closed Package: Date/time related
PHP Version: 5.4.19 OS: All
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: df1986 at aol dot com
New email:
PHP Version: OS:


 [2013-08-25 09:31 UTC] df1986 at aol dot com
I have discovered 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 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:

Actual result:


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-02-08 17:16 UTC]
-Status: Open +Status: Verified
 [2018-02-08 17:16 UTC]
Yes, you're right.
<> explains why it
should be 90° 50'.
 [2019-07-15 08:46 UTC]
The following pull request has been associated:

Patch Name: Fix #65547: Default value for sunrise/sunset zenith still wrong
On GitHub:
 [2019-07-15 11:52 UTC]
Automatic comment on behalf of
Log: Fix #65547: Default value for sunrise/sunset zenith still wrong
 [2019-07-15 11:52 UTC]
-Status: Verified +Status: Closed
 [2021-01-15 22:43 UTC] a at b dot c dot de
Documentation still needs updating (date_sunrise, date_sunset, datetime.configuration). They still use the 35' figure.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Mar 28 12:03:45 2023 UTC