#33563 [NEW]: strtotime('+1 month',$abc) cant get right time

From: Date: Mon, 04 Jul 2005 12:30:15 +0000
Subject: #33563 [NEW]: strtotime('+1 month',$abc) cant get right time
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-81366@lists.php.net to get a copy of this message
From: hufan at baidu dot com Operating system: redhat7.3 PHP version: 5.1.0b2 PHP Bug Type: Date/time related Bug description: strtotime('+1 month',$abc) cant get right time 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 bug report at http://bugs.php.net/?id=33563&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33563&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33563&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33563&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33563&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33563&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33563&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33563&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33563&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33563&r=support Expected behavior: http://bugs.php.net/fix.php?id=33563&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33563&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33563&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33563&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33563&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33563&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33563&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33563&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33563&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33563&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33563&r=mysqlcfg

« previous php.bugs (#81366) next »