[kronolith] timezone problem in Calendar Views

Arjen de Korte arjen+horde at de-korte.org
Mon Jun 16 13:42:32 UTC 2014


Citeren Systeembeheer BCS <adje at bezoekerscentrumsonsbeek.nl>:

> Citeren Arjen de Korte <arjen+horde at de-korte.org>:
>
>> Citeren Systeembeheer BCS <adje at bezoekerscentrumsonsbeek.nl>:
>>
>>> We like the time of an event to appear in the different calendar  
>>> views (Month, Week) so on the Calendar>User interface preference  
>>> page we set "Choose the views to show event start and end times  
>>> in:" to "Month, Week and Day Views". That works fine.
>>>
>>> Now when creating a new event in the calendar, some users change  
>>> the timezone in the event window from "Default" to  
>>> "Europe/Amsterdam". That should not make a difference as  
>>> Europe/Amsterdam is the default timezone anyway and all users are  
>>> set to this. But it does make a difference:
>>> - With the timezone of an event set to default, times displayed in  
>>> the calendar views are correct.
>>> - Events with the timezone set to Europe/Amsterdam appear with the  
>>> start- en ending times displayed with an offset of -2 hours.
>>>
>>> Running Horde Groupware 5.1.4, Kronolith version 4.1.5 on Ubuntu  
>>> server 12.04LTS.
>>> /etc/timezone on the system is set to Europe/Amsterdam, the 'date'  
>>> command shows the correct local time from the command line.
>>>
>>> Maybe related: although Ubuntu has the correct timezone setting,  
>>> in Horde's "global prefs">"Locale and Time" setting all users have  
>>> to set the default timezone to Europe/Amsterdam anyway to get the  
>>> correct time in Horde. I assume Horde always references to UTC  
>>> regardless of system settings?
>>
>> This is determined by the $conf[calendar][params][utc] parameter  
>> from horde/kronolith/config/conf.php. Since the Netherlands is at  
>> the moment two hours ahead of UTC, I guess this value is currently  
>> 'false'. Before setting this to 'true', mind the notes in the  
>> Kronolith administration page, since this will probably break  
>> existing appointments if you don't convert them.
>
> I checked this $conf[calendar][params][utc] parameter and found it  
> already set to true. Yet any calendar item with the timezone set to  
> Europe/Amsterdam (which is the exact same timezone as set in the  
> user prefs) will appear 2 hours too early in the calendar. Items  
> with timezone set to "default" appear with the correct time. I  
> tested again and it happens in all calendars, both shared and own.  
> Looks like the timezone correction of -2h is applied by kronolith  
> regardless of the timezone setting in the users prefs.

I vaguely remember timezone problems when the timezone lookup doesn't  
work. There were some issues a while back with the FTP servers of IANA  
being too slow in responding the lookup of the timezone database,  
causing timezone lookup failures. At the time the solution was to grab  
the file ftp://ftp.iana.org/tz/tzcode-latest.tar.gz in a cronjob once  
a week and let the webserver use the local copy by setting in  
horde/config/conf.php

     $conf['timezone']['location'] =  
'file:///usr/share/horde/tzdata-latest.tar.gz';

I'm not sure this is your issue though. In my webserver I also configured

     date.timezone = 'Europe/Amsterdam'

a while back, but I don't think this is related (it might be useful  
for other scripts that use the configured server value).

> My kronolith conf.php:
>
> $conf['calendar']['params']['table'] = 'kronolith_events';
> $conf['calendar']['params']['driverconfig'] = 'horde';
> $conf['calendar']['params']['utc'] = true;
> $conf['calendar']['driver'] = 'sql';
> $conf['storage']['default_domain'] = 'bezoekerscentrumsonsbeek.nl';
> $conf['storage']['params']['table'] = 'kronolith_storage';
> $conf['storage']['params']['driverconfig'] = 'horde';
> $conf['storage']['driver'] = 'sql';
> $conf['calendars']['driver'] = 'default';
> $conf['resource']['params']['table'] = 'kronolith_resources';
> $conf['resource']['params']['driverconfig'] = 'horde';
> $conf['resource']['params']['utc'] = true;
> $conf['resource']['driver'] = 'sql';
> $conf['autoshare']['shareperms'] = 'none';
> $conf['share']['notify'] = true;
> $conf['holidays']['enable'] = true;
> $conf['menu']['import_export'] = false;
> $conf['maps']['driver'] = false;

With the exception of the 'default_domain', this looks a lot like  
mine, so I guess this is OK.
-- 
This message was sent from a mailinglist subscription address.
For off-list replies, you must remove the address extension.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5849 bytes
Desc: S/MIME Signature
URL: <http://lists.horde.org/archives/kronolith/attachments/20140616/382c1398/attachment-0001.bin>


More information about the kronolith mailing list