18 Wrz 2009

Obliczanie różnicy czasu

echo (strtotime("2009-09-14 15:55:00")-strtotime("2009-09-14 11:00:02"));
$hour_ts = 3600;
$day_ts = 86400;
$modif_ts = strtotime("-10 day");
$modif_ts = strtotime("-4 hours");
$modif = strtotime("2009-09-14 15:55:00");
$modif_ts = strtotime($modif);
$now_ts = time()+1;
$d_ts = $now_ts-$modif_ts;
echo $d_ts .'';