$ot = $row['onlinetime'];
$hours = floor($ot/3600);
$min = floor(($ot - $hours*3600)/60);
$sec = $ot - $hours*3600 - $min*60;
$days = floor($hours/24);
si iese cam asa:
N? Name
1 Adidas 1 days, 30 hours, 26 minutes, 45 seconds
ma refer la ore ... trebuia sa ramana ce este peste 24
ms ptr ajutor
date
Moderatori: Moderatori, Start Moderator
In ce format ai data trecuta? Ar trebui sa o ai in format unix(adica 1268631916 reprezentand numarul de secunde scurse de la 1 ianuarie 1970) eu varianta aia am testat-o si merge...daca nu este incearca cu
$then = date(mktime(ore, minute, secunde, luna, zi, an));
Sau daca ai in variabila doar numarul de secunde de cand este online...atunci:
$ot = $row['onlinetime'];
$days = floor($ot/86400);
$ot = $ot - ($days*86400);
$hours = floor($ot/3600);
$ot = $ot - ($hours*3600);
$min = floor($ot/60);
$sec = $ot - ($min*60);
$then = date(mktime(ore, minute, secunde, luna, zi, an));
Sau daca ai in variabila doar numarul de secunde de cand este online...atunci:
$ot = $row['onlinetime'];
$days = floor($ot/86400);
$ot = $ot - ($days*86400);
$hours = floor($ot/3600);
$ot = $ot - ($hours*3600);
$min = floor($ot/60);
$sec = $ot - ($min*60);
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 19 vizitatori