- abs: documentation ( source)
- round: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$start = new DateTime("Now");
$start->add(new DateInterval('PT1H'));
$newTime = $start->getTimestamp() - round($start->getTimestamp() / (15 * 60)) * (15 * 60);
$start->modify("-" . abs($newTime) . " seconds");
$end = new DateTime("2015-05-16 17:00");
$interval = new DateInterval('PT15M');
$period = new DatePeriod($start, $interval, $end);
$current_date = date('d-M-Y g:i:s A');
$current_time = strtotime($current_date);
foreach ($period as $dt)
{
echo $dt->format('H:i')."<br>";
}