[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Phpgroupware-developers] datetime class localtime bug (causes a cal
From: |
Chris Weiss |
Subject: |
Re: [Phpgroupware-developers] datetime class localtime bug (causes a calendar bug) |
Date: |
Thu, 05 Dec 2002 15:53:49 +0000 |
ok this gets even more interesting:
If $this->gmtnow is false the code is looking to see if "$GLOBALS['phpgw_info']
['server']['tz_offset']" has been defined, except i can't find anywhere where
this
value might be set. If it somehow is set, $this->gmtnow = the server time -
this
server tz_offet, then the users offset is applied and everything is fine.
Since the server tz_offest is not set anywhere at all ever, it falls back to:
$this->gmtnow = time() - ($this->getbestguess() * 3600);
which seems harmless, until we look at getbestguess(), which on my server
returns -
6 so that the line does return the correct GMT time, then adds my user pref
tz_offest, which is 0 since i'm in the same tz as the server, to that and now
all
the sudden i'm not in Central US time anymore!
So basicaly the phpgwapi is assuming the servers time is GMT and isn't giving
any
clear option to tell it otherwise. I added "$GLOBALS['phpgw_info']['server']
['tz_offset'] = 0;" to my header.inc.php. I won't know if that does the trick
till
later tonight, but it should work.
- Re: [Phpgroupware-developers] datetime class localtime bug (causes a calendar bug),
Chris Weiss <=