PHP DateInterval missing a period
问题 My aim is to generate a timestamp of every minute between two given dates (the actual problem is different, but this is similar in structure and simpler to describe). I'm using the following code: $Interval = DateInterval::createFromDateString('1 minute'); $Period = new DatePeriod('2013-01-01', $Interval, '2014-01-01'); foreach ($Period as $Dt){ echo "Minute" . $Dt->format('i'); } Problem is when I run this, I would expect to find 365*24*60 entries, or 525,600, but instead only 525,540 are