#51053 [NEW]: unixtojd unit test failure
| From: | seanius at debian dot org | Date: | Mon, 15 Feb 2010 22:52:14 +0000 |
| Subject: | #51053 [NEW]: unixtojd unit test failure | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-147670@lists.php.net to get a copy of this message | ||
From: seanius at debian dot org
Operating system: Debian
PHP version: 5.3.1
PHP Bug Type: Calendar related
Bug description: unixtojd unit test failure
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 bug report at http://bugs.php.net/?id=51053&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51053&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51053&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51053&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=51053&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51053&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=51053&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=51053&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=51053&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=51053&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=51053&r=support
Expected behavior: http://bugs.php.net/fix.php?id=51053&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=51053&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=51053&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=51053&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51053&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51053&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=51053&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=51053&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=51053&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=51053&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=51053&r=mysqlcfg