ID: 51053 Updated by: [email protected] Reported By: seanius at debian dot org -Status: Open +Status: Feedback Bug Type: Date/time related Operating System: Debian PHP Version: 5.3.1 New Comment:
Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: ------------------------------------------------------------------------ [2010-02-15 23:00:08] seanius at debian dot org oh and fwiw i'm GMT+1 atm ------------------------------------------------------------------------ [2010-02-15 22:52:14] seanius at debian dot org Description: ------------ i don't know if this is a rounding problem or something else. i can reproduce the problem on multiple architectures (32/64bit and BE/LE). Note that i also found #28249 in which it was mentioned that the times are calculated based on noon, and can verify that subtracting a few hours from the second timestamp seems to get the test working. but since there's like 24 hours worth of timezones i guess any hardcoded value in the unit tests will probably fail somewhere :) maybe some kind of dynamic addition/subtraction could be done based on the local timezone? ========TEST======== <?php echo unixtojd(40000). "\n"; echo unixtojd(1000000000). "\n"; echo unixtojd(1152459009). "\n"; ?> ========DONE======== ========OUT======== 2440588 2452162 2453926 ========DONE======== ========EXP======== 2440588 2452161 2453926 ========DONE======== ========DIFF======== 002+ 2452162 002- 2452161 ========DONE======== Reproduce code: --------------- ext/calendar/tests/unixtojd.phpt Expected result: ---------------- PASS Actual result: -------------- FAIL ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=51053&edit=1
