Not Solved Time Online
#2
Not Solved
Hello there,

that time number you are talking about is UNIX Time Stamp,
To convert it you will need to use

$ysecs = 365*24*60*60;
	$mosecs = 31*24*60*60;
	$wsecs = 7*24*60*60;
	$dsecs = 24*60*60;
	$hsecs = 60*60;
	$msecs = 60;

	$years = floor($stamp/$ysecs);
	$stamp %= $ysecs;
	$months = floor($stamp/$mosecs);
	$stamp %= $mosecs;
	$weeks = floor($stamp/$wsecs);
	$stamp %= $wsecs;
	$days = floor($stamp/$dsecs);
	$stamp %= $dsecs;
	$hours = floor($stamp/$hsecs);
	$stamp %= $hsecs;
	$minutes = floor($stamp/$msecs);
	$stamp %= $msecs;
	$seconds = $stamp;

 

However MyBB has a function that will do the job

 nice_time($timetoconvert) 

time to convert is the actuall time you want to convert wheter it was already set manually or retrived from a database etc...
regards
Reply


Messages In This Thread
Time Online - by Maverickb7 - 2006-04-10, 05:48 AM
RE: Time Online - by zaher1988 - 2006-04-10, 09:42 AM
RE: Time Online - by Maverickb7 - 2006-04-10, 05:38 PM
RE: Time Online - by Michael S. - 2006-04-10, 07:36 PM
RE: Time Online - by zaher1988 - 2006-04-10, 07:44 PM
RE: Time Online - by Maverickb7 - 2006-04-10, 09:12 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)