PHP-Code:
$min = floor($offset/60);
$sec = $offset;
$days = floor($offset/60/60/24);
Offe
$min = floor($offset/60);
$sec = $offset;
$days = floor($offset/60/60/24);
$days = floor($offset/60/60/24);
$offset = $offset-($days*60*60*24);
$hours = floor($offset/60/60);
$offset = $offset-($hours*60*60);
$mins = floor($offset/60/60);
$offset = $offset-($mins*60);
<?php
$datum = "24.12.2003";
$datum_array = split("\.", "$datum");
$tag = $datum_array[0];
$monat = $datum_array[1];
$jahr = $datum_array[2];
$zeitstempel = mktime(0, 0, 0, $monat,$tag , $jahr);
$zeitstempel_now = time();
$offset = ($zeitstempel_now - $zeitstempel);
$days = floor($offset/60/60/24);
$offset = $offset - ($days * 60 *60*24);
$stunden = floor($offset/60/60);
echo "Tage:$days<br>\nStunden:$stunden<br>\n";
?>
$init_date = mktime(0,0,0,$init_mth,$init_day,$init_yr);
$dst_date = mktime(0,0,0,$dst_mth,$dst_day,$dst_yr);
$offset = ($dst_date-$init_date);
$days = floor($offset/60/60/24);
$offset = ($offset - ($days*60*60*24));
$hours = floor($offset/60/60);
$offset = ($offset - ($hours*60*60));
$mins = floor($offset/60);
$offset = ($offset - ($mins*60));
$init_date = mktime(0,0,0,$init_mth,$init_day,$init_yr);
$dst_date = mktime(0,0,0,$dst_mth,$dst_day,$dst_yr);
Kommentar