[imp] Timezone Behavior
Simon Oxwell
soxwell@central.murdoch.edu.au
Fri, 02 Aug 2002 09:06:03 +0800
Cliff Green wrote:
> Quoting Keith Hatfull <keith@hatfull.net>:
>
>
>>Hi,
>>
>>Just installed Horde 2.1 and IMP 3.1 on the following configuration:
>>
>>Windows 2000 Server
>>PHP 4.2.2
>>Xitami Webserver v2.4d9
>>MySQL 3.23.51
>>
>>All seems to work ok, except for the oft reported timezone problem.
>>
>>My timezone is set in my preferences as America/Chicago and the preference
>>persists bewteen logins. The time of last login is displayed correctly but
>>the time in the compose window as well as the timestamps of all e-mails are
>>18 hours off....should be 23:45 as I type this, IMP shows 5:45.
>
>
> I had a similar problem with PHP 4.2.1 under Solaris, with Apache 2.0.x; but no
> problem with PHP 4.1.2 and Apache 1.3.x. I "fixed" it by replacing all
> date('r') calls in imp/compose.php with calls to strftime() with a properly
> formatted date string, and a test for which timezone to use.
<SNIP>
> I have no such problem under linux, so I've assumed there's an issue with how
> date() is called on those OSes.
The issue as far as I can see has more to do with how PHP interacts with
the system.
The timezones specified in lang.php in the horde config directory don't
actually match the timezones the OS knows about (at least under
Solaris). Thus PHP has no idea what to actually do with the timezone
specified.
Case is point - I manage a university student webmail system in Perth,
Western Australia.
The timezone specified in lang.php is 'Australia/Perth'. Unfortunately,
Solaris has no idea what this means. Once I changed it to
'Australia/West' everything started working properly.
/usr/share/lib/zoneinfo/ (at least under Solaris 8) has all available
timezones - they're different to the ones under Linux.
Had problems with locales (date formats, mostly) to, until I told
lang.php about en_AU.
Not sure if Win2K has the same/similar issues.
Simon
--
o Simon Oxwell --------- Computer and Database Administrator (ITS) o
| soxwell@central.murdoch.edu.au Phone: +61 08 9360 7335 |
| SC1.37 Murdoch University |
o------- "Yes, Wubba Wubba Wubba is a Monster song" - Grover ------o