From: Operating system: Windows Server 2008 R2 x64 PHP version: 5.3.5 Package: Date/time related Bug Type: Bug Bug description:date_diff returns wrong results
Description: ------------ See test script. On FreeBSD 8.1-RELEASE-p1 amd64, Linux 2.6.18-194.32.1.el5 x86_64, Windows 7 x64 everything works fine. Test script: --------------- date_default_timezone_set("UTC"); $d = new DateTime("2011-01-01"); echo $d->diff(new DateTime("2010-01-01"))->format("%a"); Expected result: ---------------- 365 Actual result: -------------- 6015 -- Edit bug report at http://bugs.php.net/bug.php?id=53880&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53880&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53880&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53880&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53880&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53880&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53880&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53880&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53880&r=needscript Try newer version: http://bugs.php.net/fix.php?id=53880&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53880&r=support Expected behavior: http://bugs.php.net/fix.php?id=53880&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53880&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53880&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53880&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53880&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=53880&r=dst IIS Stability: http://bugs.php.net/fix.php?id=53880&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53880&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53880&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53880&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53880&r=mysqlcfg