From:             ozsvar at yahoo dot com
Operating system: Linux, Windows
PHP version:      4.3.4
PHP Bug Type:     Date/time related
Bug description:  strtotime()

Description:
------------
I have found a bug at function strtotime().
When the system date is 30. January and I call strtotime with parameter:
+1 month the result is wrong: March!!!


Reproduce code:
---------------
<?
  // If the system date is 2004-01-30

  echo date("Y-m", strtotime("+1 month"));

  // The result will be 2004-03 !!!!!!
?>

Expected result:
----------------
I expect 2004-02 !!!


-- 
Edit bug report at http://bugs.php.net/?id=27095&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27095&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27095&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27095&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27095&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27095&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27095&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27095&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27095&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27095&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27095&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27095&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27095&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27095&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27095&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27095&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27095&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27095&r=float

Reply via email to