Edit report at https://bugs.php.net/bug.php?id=51053&edit=1
ID: 51053 Updated by: s...@php.net Reported by: seanius at debian dot org Summary: unixtojd unit test failure -Status: Open +Status: Feedback Type: Bug Package: Calendar related Operating System: Debian PHP Version: 5.3SVN-2010-02-16 (snap) Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ See http://svn.php.net/viewvc?view=revision&revision=317340 Previous Comments: ------------------------------------------------------------------------ [2010-02-16 09:03:29] seanius at debian dot org (after a configure --enable-calendar --enable-cli && make) rangda[/home/sean/Download/php5.3-201002160730] ./run-tests.php -p ./sapi/cli/php ext/calendar/tests/unixtojd.phpt ===================================================================== PHP : ./sapi/cli/php PHP_SAPI : cli PHP_VERSION : 5.3.3-dev ZEND_VERSION: 2.3.0 PHP_OS : Linux - Linux rangda 2.6.32-trunk-amd64 #1 SMP Sun Jan 10 22:40:40 UTC 2010 x86_64 INI actual : /home/sean/Download/php5.3-201002160730 More .INIs : CWD : /home/sean/Download/php5.3-201002160730 Extra dirs : VALGRIND : Not used ===================================================================== Running selected tests. FAIL unixtojd() [ext/calendar/tests/unixtojd.phpt] ===================================================================== Number of tests : 1 1 Tests skipped : 0 ( 0.0%) -------- Tests warned : 0 ( 0.0%) ( 0.0%) Tests failed : 1 (100.0%) (100.0%) Expected fail : 0 ( 0.0%) ( 0.0%) Tests passed : 0 ( 0.0%) ( 0.0%) --------------------------------------------------------------------- Time taken : 0 seconds ===================================================================== ===================================================================== FAILED TEST SUMMARY --------------------------------------------------------------------- unixtojd() [ext/calendar/tests/unixtojd.phpt] ===================================================================== ------------------------------------------------------------------------ [2010-02-16 08:44:36] j...@php.net Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [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 https://bugs.php.net/bug.php?id=51053&edit=1