summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/date/php_date.c2
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) {