From:             
Operating system: Windows
PHP version:      5.3.2RC3
Package:          Date/time related}
Bug Type:         Bug
Bug description:DateInterval has incorrect days property on windows

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 bug report at http://bugs.php.net/bug.php?id=51184&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=51184&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=51184&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=51184&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=51184&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51184&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=51184&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=51184&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=51184&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=51184&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=51184&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=51184&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=51184&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=51184&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=51184&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51184&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51184&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=51184&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=51184&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=51184&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=51184&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=51184&r=mysqlcfg

Reply via email to