|
#1
|
|||
|
|||
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?
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"); } 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"); } |
#2
|
|||
|
|||
Would be nice if you posted how you fixed it, then other members that have similar issues can fix theirs.
|
#3
|
|||
|
|||
You have to modify the sql to set the default timezone to 120 :)
|
Tags |
date , join , problems |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Time and date | wMan | BT.Manager (phpMyBitTorrent) | 2 | 15th August 2009 06:34 |
Join date & Last seen Issue | majio | Template Shares | 0 | 17th July 2009 20:07 |
Warning: date() expects Pls Help | kiper | Yuna Scatari Edition (YSE) | 0 | 30th December 2008 21:50 |
Date and Time Help | tcbroonsie | Free Torrent Source | 1 | 1st December 2008 04:56 |
time & date | snakebite | Torrent Strike | 2 | 14th May 2008 21:35 |