>>597
$time = int(($time + 59) / 60) * 60;