ID: 47574 Updated by: [email protected] Reported By: privatevideo at list dot ru -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: Windows PHP Version: 5.2.9 New Comment:
We are happy to tell you that you just discovered Daylight Savings Time. For more information see: http://webexhibits.org/daylightsaving/b.html Instead of using mktime/date consider using gmmktime and gmdate which do not suffer from DST. Previous Comments: ------------------------------------------------------------------------ [2009-03-05 16:57:39] privatevideo at list dot ru Description: ------------ date() function works incorrect :-( Reproduce code: --------------- # check line 179-180, it should add a minute every step for ($i=0,$d=1224964800;$d<=1225051200;$d+=60,++$i) echo "<br>$i -> ".date('Y-m-d H:i:s',$d); Expected result: ---------------- 179 -> 2008-10-26 02:59:00 180 -> 2008-10-26 03:00:00 181 -> 2008-10-26 03:01:00 182 -> 2008-10-26 03:02:00 Actual result: -------------- 179 -> 2008-10-26 02:59:00 180 -> 2008-10-26 02:00:00 181 -> 2008-10-26 02:01:00 182 -> 2008-10-26 02:02:00 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47574&edit=1
