From:             michael dot matrix at ejgallo dot com
Operating system: Windows 2000
PHP version:      5.1.1
PHP Bug Type:     Date/time related
Bug description:  strtotime is not parseing "+x day" correctly

Description:
------------
strtotime should be able to add 1 day to a given timestamp using "+1 day",
under php 5.0.4 it does, after upgrading to 5.1.1 it returns "12/31/1969"

Reproduce code:
---------------
$date = "12/21/2005";
$stamp = strtotime($date);
$new_date = date('n/j/Y',strtotime("+ 1 day",$stamp));


echo "<br>Date: ".$date;
echo "<br>Date +1: ".$new_date;


Expected result:
----------------
Date: 12/21/2005
Date +1: 12/22/2005

Actual result:
--------------
Date: 12/21/2005
Date +1: 12/31/1969

-- 
Edit bug report at http://bugs.php.net/?id=35766&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=35766&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=35766&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=35766&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=35766&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=35766&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=35766&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=35766&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=35766&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=35766&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=35766&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=35766&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=35766&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=35766&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=35766&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=35766&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=35766&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=35766&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=35766&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=35766&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=35766&r=mysqlcfg

Reply via email to