ID: 31853 Updated by: [EMAIL PROTECTED] Reported By: php-bugs at demark dot org -Status: Open +Status: Closed Bug Type: Date/time related Operating System: Linux PHP Version: 5.0.3 -Assigned To: +Assigned To: pajoye New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2005-02-05 17:24:03] php-bugs at demark dot org Description: ------------ Line 207 of ext/standard/sunfuncs.c is: RETURN_LONG((int) (time - (time % (24 * 3600))) + (int) (60 * ret)); since 'ret' is a double representing the number of hours since midnight the sun event occurred and 'time' is in seconds, the last multiplier should be number of seconds in an hour, not number of minutes in a hour: RETURN_LONG((int) (time - (time % (24 * 3600))) + (int) (3600 * ret)); or, if you want to save one arithmetic step: RETURN_LONG((int) (time - (time % 86400)) + (int) (3600 * ret)); This is also the cause of Bug #30745. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31853&edit=1