From e7e64b1ada481710704c16bfb8ee4a7c337dc8f1 Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Mon, 17 Dec 2007 00:44:09 +0100 Subject: BUGFIX: local time should now work correctly had to reset the timezone to the local time. added a config parameter to store the local timezone. --- output.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'output.php') diff --git a/output.php b/output.php index 5d84d46..98bfb9d 100644 --- a/output.php +++ b/output.php @@ -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 "
last login: ".date("r",$unixtime)."
"; }; -- cgit v1.2.3-18-g5258