summaryrefslogtreecommitdiff
path: root/ext/date/php_date.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2007-06-06 23:16:34 +0000
committerIlia Alshanetsky <iliaa@php.net>2007-06-06 23:16:34 +0000
commitd02356922a589443ecd9645df39833d8439f01f3 (patch)
treeabe2a565c9a64819e107931effd457e2a79f29e5 /ext/date/php_date.c
parenta20bba04d56e6f136892c13008b900f2ca694c13 (diff)
downloadphp-git-d02356922a589443ecd9645df39833d8439f01f3.tar.gz
Adjust previous patch to work on all compilers
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r--ext/date/php_date.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 36ce6bc123..4a74f2c91c 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -2329,9 +2329,9 @@ 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) {
- N %= 24;
+ N -= floor(N / 24) * N;
} else if (N < 0) {
- N = N % 24 + 24;
+ N = floor(N / 24) * -N + 24;
}
switch (retformat) {