#33563 [Opn->Fbk]: strtotime('+1 month',$abc) cant get right time
| From: | derick@php.net | Date: | Mon, 04 Jul 2005 12:38:38 +0000 |
| Subject: | #33563 [Opn->Fbk]: strtotime('+1 month',$abc) cant get right time | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-81367@lists.php.net to get a copy of this message | ||
ID: 33563
Updated by: derick@php.net
Reported By: hufan at baidu dot com
-Status: Open
+Status: Feedback
Bug Type: Date/time related
Operating System: redhat7.3
PHP Version: 5.1.0b2
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-07-04 14:30:14] hufan at baidu dot com
Description:
------------
strtotime('+1 month',$abc) cant get right time
Reproduce code:
---------------
<?
$strCurrDate = date('Y-m-d H:i:s',strtotime('2005-06-30 21:04:23'));
$strMonAfter = date('Y-m-d H:i:s',strtotime('+1
month',strtotime($strCurrDate)));
echo "strCurrDate:$strCurrDate strMonAfter:$strMonAfter";
?>
Expected result:
----------------
should be£º
strCurrDate:2005-07-01 05:04:23 strMonAfter:2005-08-01 05:04:23
Actual result:
--------------
strCurrDate:2005-07-01 05:04:23 strMonAfter:2005-08-01 13:04:23
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33563&edit=1