I'm having some problems with get_date_time() ( i think ) it shows that the user has signed up 2 hours ago, but he just did, and it shows that las time he was online was six days ago. Any idea what's wrong?
Code:
function get_date_time($timestamp = 0)
{
if ($timestamp)
return date("Y-m-d H:i:s", $timestamp);
else
return gmdate("Y-m-d H:i:s");
}
here's everything about time
Code:
function display_date_time($timestamp = 0)
{
if ($timestamp)
return date("Y-m-d H:i:s", $timestamp);
else
return gmdate("Y-m-d H:i:s");
}
function get_user_timezone($id = '') {
if(!isset($id) || empty($id) || !is_valid_id($id))
return "120"; //Default timezone
$query = mysql_query("SELECT * FROM users WHERE id=".sqlesc($id)." LIMIT 1");
if (mysql_num_rows($query) != "0")
{
$kasutaja = mysql_fetch_array($query);
return "$kasutaja[tzoffset]";
}else
return "120"; //Default timezone
}
function get_dt_num()
{
return gmdate("YmdHis");
}
Bump: Nevermind, i fixed it, you may close the thread.