From:             mguichar at univ-lr dot fr
Operating system: Windows / Linux
PHP version:      5.2.8
PHP Bug Type:     Date/time related
Bug description:  Datetime::Modify 

Description:
------------
When I add 1 hour to Datetime Object (using modify function), it's not 1
hour but 2 hour which are added. This bug appear only for date : 2001-03-25
01:03:00 / 2002-03-31 01:03:00 / 2003-03-30 01:03:00 / 2004-03-28 01:03:00
/ 2005-03-27 01:03:00 / 2006-03-26 01:03:00 / 2007-03-25 01:03:00 /
2008-03-30 01:03:00

Reproduce code:
---------------
$date= date_create('2001-03-25 01:03:00');
echo $date->format("Y-m-d H:m:s")." +1 hour =>\n";
$date->modify("+1 hour");
echo $date->format("Y-m-d H:m:s")."\n\n";

$date= date_create('2002-03-31 01:03:00');
echo $date->format("Y-m-d H:m:s")." +1 hour =>\n";
$date->modify("+1 hour");
echo $date->format("Y-m-d H:m:s")."\n\n";

...

Expected result:
----------------
2001-03-25 01:03:00 +1 hour =>
2001-03-25 02:03:00

2002-03-31 01:03:00 +1 hour =>
2002-03-31 02:03:00

...

Actual result:
--------------
2001-03-25 01:03:00 +1 hour =>
2001-03-25 03:03:00

2002-03-31 01:03:00 +1 hour =>
2002-03-31 03:03:00

...

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

Reply via email to