Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   Problems with join date (http://www.bvlist.com/showthread.php?t=1478)

Seth 24th November 2008 02:57

Problems with join date
 
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? :drink:

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. :wallbash:

Krypto 24th November 2008 13:57

Would be nice if you posted how you fixed it, then other members that have similar issues can fix theirs.

Seth 24th November 2008 15:58

You have to modify the sql to set the default timezone to 120 :)


All times are GMT +2. The time now is 22:42.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.