04-08-2010, 12:41 PM
Essaye ça car je pense que c'est list le soucis:
Code PHP :
<?php
$date1= "15:00:00";
$date2= "05:00:00";
//thx niahoo ;)
$time1 = explode(':', $date1);
$time2 = explode(':', $date2);
$timestamp1 = mktime($time1[0], $time1[2], $time1[2], 0, 0, 0);
$timestamp2 = mktime($time2[0], $time2[2], $time2[2], 0, 0, 0);
$resultat=gmdate("H:i:s",$timestamp1-$timestamp2);
echo $resultat;
?>
Et si tu pouvais nous donner la version de php que tu utilise.