summaryrefslogtreecommitdiffstats
path: root/output.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2007-12-17 00:44:09 +0100
committerArun Persaud <arun@nubati.net>2007-12-17 00:51:18 +0100
commite7e64b1ada481710704c16bfb8ee4a7c337dc8f1 (patch)
tree220fa54af83c921393d006e53f3f026cf4745be5 /output.php
parentacf6c5f97944366952e6b373a4d59cecd08b658e (diff)
downloade-DoKo-e7e64b1ada481710704c16bfb8ee4a7c337dc8f1.tar.gz
e-DoKo-e7e64b1ada481710704c16bfb8ee4a7c337dc8f1.tar.bz2
e-DoKo-e7e64b1ada481710704c16bfb8ee4a7c337dc8f1.zip
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.
Diffstat (limited to 'output.php')
-rw-r--r--output.php4
1 files changed, 3 insertions, 1 deletions
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 "<div class=\"lastlogin\">last login: ".date("r",$unixtime)."</div>";
};