diff options
| author | Rasmus Lerdorf <rasmus@php.net> | 2009-09-15 20:28:42 +0000 |
|---|---|---|
| committer | Rasmus Lerdorf <rasmus@php.net> | 2009-09-15 20:28:42 +0000 |
| commit | d032060ea8db0a45d4d5001904081478d69d1c38 (patch) | |
| tree | 586fef897e4ff90007faac8c150d058f9e21ae75 | |
| parent | f611b660250ff4085fdea054dead605efdb0af43 (diff) | |
| download | php-git-d032060ea8db0a45d4d5001904081478d69d1c38.tar.gz | |
Fix bug #49558
And as Colin mentioned in the bug report, this means date_sunrise()
and date_sunset() have been off by 26 seconds in most cases until now.
| -rw-r--r-- | ext/date/php_date.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index fafe4f97d5..c4598fae08 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -3927,7 +3927,7 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_su } timelib_unixtime2local(t, time); - rs = timelib_astro_rise_set_altitude(t, longitude, latitude, altitude, altitude > -1 ? 1 : 0, &h_rise, &h_set, &rise, &set, &transit); + rs = timelib_astro_rise_set_altitude(t, longitude, latitude, altitude, calc_sunset?0:1, &h_rise, &h_set, &rise, &set, &transit); timelib_time_dtor(t); if (rs != 0) { |
