Jump to content

timezone alter time


everlifefree

Recommended Posts

I was wondering if you could help me make it so that my users last login and online since will so the proper time relating to there timezone instead of just the time on the server. When my user sign up the enter a variable into the database of like "US mountain time would be -7" and the variable "-7" in stored in the database table users under the timezone section thing... Please help!

 

heres the current php used:

 

/* Figure out if the user is online or not */

if (_fnc("user", $_GET["id"], "last_load") > (date("U") - 180)) {

$tpl -> Zone("onlinecheck", "online");

$tpl -> AssignArray(array(

"onlinesince" => date($CONF["LOCALE_SHORT_TIME"], _fnc("user", $_GET["id"], "last_login")),

"online.object" => $GLOBALS["OBJ"]["online"]

));

 

} elseif (_fnc("user", $_GET["id"], "last_login") != 0) {

$tpl -> Zone("onlinecheck", "offline");

$tpl -> AssignArray(array(

"lastlogin" => date($CONF["LOCALE_SHORT_DATE_TIME"], _fnc("user", $_GET["id"], "last_login")),

"online.object" => NULL

));

 

} else {

$tpl -> Zone("onlinecheck", "nologin");

$tpl -> AssignArray(array(

"lastlogin" => NULL,

"online.object" => NULL

));

}

 

 

Link to comment
Share on other sites

For me it is, and according to this post, it seems it is for you too.

 

but how to I get the offset to automaticly change to the correct +/- whatever that is listed in the database table "users" under the timezone area 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.