|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-04-20 11:24 UTC] aharvey@php.net
-Status: Open
+Status: Bogus
[2010-04-20 11:24 UTC] aharvey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 08:00:01 2025 UTC |
Description: ------------ When you try to create a succession of months using the following code, you will notice a very ugly bug that results in skipping months Test script: --------------- for( $i = strtotime("2004-10-01" ); $i <= mktime(); $i += (24*60*60 * cal_days_in_month( CAL_GREGORIAN, date("m", $i), date("Y", $i) )) ) { $year_month = date("Ymd H:i:s", $i); echo "<br />".$year_month; } Expected result: ---------------- 20041001 00:00:00 20041101 00:00:00 20041201 00:00:00 Actual result: -------------- 20041001 00:00:00 20041031 23:00:00 20041201 23:00:00