ID:               32103
 Updated by:       [EMAIL PROTECTED]
 Reported By:      zini10 at 012 dot net dot il
-Status:           Open
+Status:           Assigned
 Bug Type:         Date/time related
 Operating System: Windows
 PHP Version:      4.3.8
-Assigned To:      
+Assigned To:      derick


Previous Comments:
------------------------------------------------------------------------

[2005-02-25 10:56:54] [EMAIL PROTECTED]

<?
print date("Y-m-d h:m:s",strtotime("2005-02-28 00:00:00 -3 months"));
?>
works fine (note that there is no space between "-" and "3").

------------------------------------------------------------------------

[2005-02-25 08:22:30] zini10 at 012 dot net dot il

Description:
------------
strtotime() will not parse the following call the right way:
strtotime("2005-02-28 00:00:00 - 3 months")
but will parse this correctly:
strtotime("2005-02-28 00:00:00 + -3 months")



Reproduce code:
---------------
print date("Y-m-d h:m:s",strtotime("2005-02-28 00:00:00 - 3 months"));

print date("Y-m-d h:m:s",strtotime("2005-02-28 00:00:00 + -3 months"));

Expected result:
----------------
2004-11-25 12:11:00

Actual result:
--------------
2005-05-25 12:05:00


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=32103&edit=1

Reply via email to