ID:               47271
 User updated by:  mguichar at univ-lr dot fr
 Reported By:      mguichar at univ-lr dot fr
 Status:           Open
 Bug Type:         Date/time related
 Operating System: Windows / Linux
 PHP Version:      5.2.8
 New Comment:

Same bug with date :
1998/03/29
1999/03/28
2000/03/26
and probably for each year before 1998 !


Previous Comments:
------------------------------------------------------------------------

[2009-02-02 09:58:42] mguichar at univ-lr dot fr

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 this bug report at http://bugs.php.net/?id=47271&edit=1

Reply via email to