From: [EMAIL PROTECTED] Operating system: WinXP PHP version: 5.1.0b3 PHP Bug Type: Output Control Bug description: Many Problems with SunFuncs
Description: ------------ With sunfuncs (date_sunrise, date_sunset) When I do date_sunset(time(), 46.49, -71.14, 90); (I forgot the output format). The server seems to be frozen and I can't load another page before I restart Apache... Even with this line (with the output format) : echo date_sunset(time(), 1, -71.14, 90, 90); Next: When asking for a String format, if the var "ret" is near 00:00 and adding a gmt negative (see sunfuncs.c), the output will be bad (-3:-3) (because of the gmt_offset). because the line sprintf(retstr, "%02d:%02d", N, (int) (60 * (ret - (double) N))); doesn't care about negative or positive values You should add if(ret < 0){ ret += 24; } (almost the same as #31853 but negative values appears on string and double) In doc, it should explain a little more the decimal values for latitude, is it minutes (60 based) or 100 based. Moreover, I spent time to realize that zenith was the angle for the sun when it is on the horizon (so almost always 90), it should be written in the doc. -- Edit bug report at http://bugs.php.net/?id=33789&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33789&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33789&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33789&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33789&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33789&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33789&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33789&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33789&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33789&r=support Expected behavior: http://bugs.php.net/fix.php?id=33789&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33789&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33789&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33789&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33789&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33789&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33789&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33789&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33789&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33789&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33789&r=mysqlcfg