Edit report at http://bugs.php.net/bug.php?id=51184&edit=1
ID: 51184 Updated by: ka...@php.net Reported by: s...@php.net Summary: DateInterval has incorrect days property on windows -Status: Open +Status: Feedback Type: Bug Package: Date/time related Operating System: Windows PHP Version: 5.3.2RC3 New Comment: Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Derick fixed #49778, did that fix the issue? Previous Comments: ------------------------------------------------------------------------ [2010-03-02 13:41:41] s...@php.net Description: ------------ On Windows, no matter what the dates are, the "days" property of the DateInterval object returned by DateTime::diff() is always 6015. Might be related to http://bugs.php.net/bug.php?id=49778 and http://bugs.php.net/bug.php?id=49081 Test script: --------------- $start = new DateTime('2010-06-06'); $end = new DateTime('2011-02-04'); echo $start->diff($end)->days; $start = new DateTime('2005-01-01'); echo $start->diff($end)->days; Expected result: ---------------- The right number of days, or at least always 42 :) Actual result: -------------- 6015, always. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51184&edit=1