ID: 40861
Updated by: [EMAIL PROTECTED]
Reported By: eheien at heli-one dot ca
-Status: Open
+Status: Assigned
Bug Type: Date/time related
Operating System: Windows 2003 and XP
PHP Version: 5.2.1
-Assigned To:
+Assigned To: derick
Previous Comments:
------------------------------------------------------------------------
[2007-03-20 09:07:49] eheien at heli-one dot ca
Description:
------------
strtotime() fails when supplied with both a negative and positive
argument. This worked in php 5.0.5 and php 4.x.x.
+- = -
++ = +
-- = +
Reproduce code:
---------------
$offset = -60;
$ts = strtotime('2000-01-01 12:00:00');
$result = date("Y-m-d H:i:s", strtotime("+$offset minutes", $ts));
echo $result;
Expected result:
----------------
2000-01-01 11:00:00
Actual result:
--------------
1970-01-01 01:00:00
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40861&edit=1