mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Final shot at the date issue
This commit is contained in:
parent
c4b5196d0b
commit
a6340d27ae
@ -2330,10 +2330,8 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_su
|
||||
}
|
||||
N = (calc_sunset ? h_set : h_rise) + gmt_offset;
|
||||
|
||||
if (N > 24) {
|
||||
if (N > 24 || N < 0) {
|
||||
N -= floor(N / 24) * 24;
|
||||
} else if (N < 0) {
|
||||
N = floor(N / 24) * 24 + 24;
|
||||
}
|
||||
|
||||
switch (retformat) {
|
||||
|
Loading…
Reference in New Issue
Block a user