Bug #51894 [Opn->Fbk]: DateTime::Diff breaks range()
| From: | derick@php.net | Date: | Mon, 24 May 2010 09:44:37 +0000 |
| Subject: | Bug #51894 [Opn->Fbk]: DateTime::Diff breaks range() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-150755@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51894&edit=1
ID: 51894
Updated by: derick@php.net
Reported by: ronald dot fischer at ummanzer dot de
Summary: DateTime::Diff breaks range()
-Status: Open
+Status: Feedback
Type: Bug
Package: Date/time related
Operating System: Windows 7 Home Premium 64bit
PHP Version: 5.3.2
New Comment:
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[2010-05-23 22:34:19] ronald dot fischer at ummanzer dot de
Description:
------------
After calling DateTime::Diff() the first call to range() fails and
issues a warning.
Test script:
---------------
date_default_timezone_set('Europe/Paris');
$dt = new DateTime('2010-10-10');
$dt->diff(new DateTime('2010-12-12'));
range(0,-1,1);
Expected result:
----------------
array(2) { [0]=> int(0) [1]=> int(-1) }
Actual result:
--------------
Warning: range(): step exceeds the specified range
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51894&edit=1