Here is a short neat function to round minutes (hour) ...
<?php
function minutes_round ($hour = '14:03:32', $minutes = '5', $format = "H:i")
{
// by Femi Hasani [www.vision.to]
$seconds = strtotime($hour);
$rounded = round($seconds / ($minutes * 60)) * ($minutes * 60);
return date($format, $rounded);
}
?>
You decide to round to nearest minute ...
example will produce : 14:05