Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ext/date/php_date.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,11 +581,11 @@ int php_date_global_timezone_db_enabled;
#define DATE_DEFAULT_LATITUDE "31.7667"
#define DATE_DEFAULT_LONGITUDE "35.2333"

/* on 90'35; common sunset declaration (start of sun body appear) */
#define DATE_SUNSET_ZENITH "90.583333"
/* on 90'50; common sunset declaration (start of sun body appear) */
#define DATE_SUNSET_ZENITH "90.833333"

/* on 90'35; common sunrise declaration (sun body disappeared) */
#define DATE_SUNRISE_ZENITH "90.583333"
/* on 90'50; common sunrise declaration (sun body disappeared) */
#define DATE_SUNRISE_ZENITH "90.833333"

static PHP_INI_MH(OnUpdate_date_timezone);

Expand Down Expand Up @@ -5013,7 +5013,7 @@ PHP_FUNCTION(date_sun_info)
array_init(return_value);

/* Get sun up/down and transit */
rs = timelib_astro_rise_set_altitude(t, longitude, latitude, -35.0/60, 1, &ddummy, &ddummy, &rise, &set, &transit);
rs = timelib_astro_rise_set_altitude(t, longitude, latitude, -50.0/60, 1, &ddummy, &ddummy, &rise, &set, &transit);
switch (rs) {
case -1: /* always below */
add_assoc_bool(return_value, "sunrise", 0);
Expand Down
4 changes: 2 additions & 2 deletions ext/date/tests/date_sun_info_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ echo "Done\n";
--EXPECT--
array(9) {
["sunrise"]=>
int(1165897761)
int(1165897682)
["sunset"]=>
int(1165934160)
int(1165934239)
["transit"]=>
int(1165915961)
["civil_twilight_begin"]=>
Expand Down
4 changes: 2 additions & 2 deletions ext/date/tests/date_sun_info_002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ foreach ($sun_info as $key => $elem )
echo "Done\n";
?>
--EXPECT--
2007-04-13 06:13:31 CEST sunrise
2007-04-13 20:30:51 CEST sunset
2007-04-13 06:11:26 CEST sunrise
2007-04-13 20:32:56 CEST sunset
2007-04-13 13:22:11 CEST transit
2007-04-13 05:29:22 CEST civil_twilight_begin
2007-04-13 21:15:00 CEST civil_twilight_end
Expand Down
4 changes: 2 additions & 2 deletions php.ini-development
Original file line number Diff line number Diff line change
Expand Up @@ -947,10 +947,10 @@ cli_server.color = On
;date.default_longitude = 35.2333

; http://php.net/date.sunrise-zenith
;date.sunrise_zenith = 90.583333
;date.sunrise_zenith = 90.833333

; http://php.net/date.sunset-zenith
;date.sunset_zenith = 90.583333
;date.sunset_zenith = 90.833333

[filter]
; http://php.net/filter.default
Expand Down
4 changes: 2 additions & 2 deletions php.ini-production
Original file line number Diff line number Diff line change
Expand Up @@ -949,10 +949,10 @@ cli_server.color = On
;date.default_longitude = 35.2333

; http://php.net/date.sunrise-zenith
;date.sunrise_zenith = 90.583333
;date.sunrise_zenith = 90.833333

; http://php.net/date.sunset-zenith
;date.sunset_zenith = 90.583333
;date.sunset_zenith = 90.833333

[filter]
; http://php.net/filter.default
Expand Down