Zkuste:
Funkce:
function date_difference ($date1timestamp, $date2timestamp) {
$all = round(($date1timestamp - $date2timestamp) / 60);
$d = floor ($all / 1440);
$h = floor (($all - $d * 1440) / 60);
$m = $all - ($d * 1440) - ($h * 60);
//Since you need just hours and mins
return array('hours'=>$h, 'mins'=>$m);
}
Volání funkce:
$result = date_difference($date1timestamp, $date2timestamp);