diff options
-rw-r--r-- | config.php_template | 4 | ||||
-rw-r--r-- | functions.php | 6 | ||||
-rw-r--r-- | output.php | 4 |
3 files changed, 9 insertions, 5 deletions
diff --git a/config.php_template b/config.php_template index fb84a51..761d889 100644 --- a/config.php_template +++ b/config.php_template @@ -27,6 +27,8 @@ /* used as the reply email in each email */ $EMAIL_REPLY=""; - /* this should point to your index.file */ + /* this should point to your index.file, probably without the http:// to avoid extra requests */ $host = "http://.../index.php" + + $defaulttimezone = date_default_timezone_get(); ?>
\ No newline at end of file diff --git a/functions.php b/functions.php index c835f89..b1ed09f 100644 --- a/functions.php +++ b/functions.php @@ -640,7 +640,7 @@ function can_call($what,$hash) function display_table () { - global $gameid, $GT, $debug,$host; + global $gameid, $GT, $debug,$host,$defaulttimezone; $result = mysql_query("SELECT User.fullname as name,". " Hand.position as position, ". @@ -668,10 +668,10 @@ function display_table () $call = $r[5]; $hash = $r[7]; $timezone = $r[8]; + date_default_timezone_set($defaulttimezone); + $lastlogin = strtotime($r[6]); date_default_timezone_set($timezone); $timenow = strtotime(date("Y-m-d H:i:s")); - $lastlogin = strtotime($r[6]); - echo " <div class=\"table".($pos-1)."\">\n"; if(!$debug) @@ -366,6 +366,7 @@ function output_footer() function output_status() { + global $defaulttimezone; if(isset($_SESSION["name"])) { $name = $_SESSION["name"]; @@ -379,10 +380,11 @@ function output_status() /* last logon time */ $myid = DB_get_userid_by_name($name); $zone = DB_get_user_timezone($myid); - date_default_timezone_set($zone); $time = DB_get_user_timestamp($myid); + date_default_timezone_set($defaulttimezone); $unixtime = strtotime($time); + date_default_timezone_set($zone); echo "<div class=\"lastlogin\">last login: ".date("r",$unixtime)."</div>"; }; |