fixed wrong users_localtime time:

offset in user_prefs is not against GMT but servertime
This commit is contained in:
Ralf Becker 2003-05-17 21:25:09 +00:00
parent 9a074ef8b3
commit 6b8a74ecc9

View File

@ -62,13 +62,15 @@
if(isset($GLOBALS['phpgw_info']['server']['tz_offset']))
{
$this->gmtnow = time() - (intval($GLOBALS['phpgw_info']['server']['tz_offset']) * 3600);
//echo "<p>set via tz_offset=".$GLOBALS['phpgw_info']['server']['tz_offset'].": gmtnow=".date('Y/m/d H:i',$this->gmtnow)."</p>\n";
}
else
{
$this->gmtnow = time() - ($this->getbestguess() * 3600);
//echo "<p>set via bestguess=".$this->getbestguess().": gmtnow=".date('Y/m/d H:i',$this->gmtnow)."</p>\n";
}
}
$this->users_localtime = $this->gmtnow + $this->tz_offset;
$this->users_localtime = time() + $this->tz_offset;
}
function getntpoffset()