Page MenuHomePhorge

Kolab16: Not a valid olson timezone: Etc/GMT-1
Closed, ResolvedPublic

Description

I don't know which client or device sends the strange timezone Etc/GMT-1.
Feel free to close this issue as WONTFIX. I just wanted to report it, in case this problem happens for other people too.

PHP Error: kolabformat Error:  0:   Not a valid olson timezone: Etc/GMT-1 in /usr/share/roundcubemail/plugins/libkolab/lib/kolab_format.php on line 381 (POST /roundcubemail/qJd7gxTiu00OHwCW/?_task=calendar&_action=event)
PHP Error: Error saving event object to Kolab server in /usr/share/roundcubemail/plugins/calendar/drivers/kolab/kolab_calendar.php on line 470 (POST /roundcubemail/qJd7gxTiu00OHwCW/?_task=calendar&_action=event)

the error is from here: https://cgit.kolab.org/libkolabxml/tree/src/objectvalidation.cpp#n54

olsonTimezones are defined in https://cgit.kolab.org/libkolabxml/tree/tztable.h

rpm -qa | grep libkolab

roundcubemail-plugin-libkolab-skin-larry-assets-3.3.3-99.tbits20170829.el7.centos.noarch
libkolabxml-1.2-6.1.el7.centos.kolab_16.x86_64
roundcubemail-plugin-libkolab-3.3.3-99.tbits20170829.el7.centos.noarch
libkolab-2.0-6.1.el7.centos.kolab_16.x86_64
roundcubemail-plugin-libkolab-assets-3.3.3-99.tbits20170829.el7.centos.noarch

Details

Ticket Type
Task

Event Timeline

I got more details: the client is Firefox 56 running on Windows Server 2012 R2. The timezone setting for the user in Roundcube is "auto".

I checked how the timezone is determined: at login time, the timezone is detected:

and then passed to Roundcube:

for timezone detection, the library https://bitbucket.org/pellepim/jstimezonedetect is used.
from their file I cannot find how they would pass Etc/GMT-1:
https://bitbucket.org/pellepim/jstimezonedetect/src/6c427658686c664da52c6a87cd62ec910baab276/jstz.main.js?at=default&fileviewer=file-view-default#jstz.main.js-438

I will try to find access to a Windows Server 2012 R2...

It does not depend on Windows Server version.
It does not depend on Firefox version either.

On the same server, with Firefox 56.0.1 installed, I get with one Windows user profile "Europe/Berlin", and with another windows user I get "Etc/GMT-1".

The jstz library uses https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat

According to Firefox Bugzilla (https://bugzilla.mozilla.org/show_bug.cgi?id=1330307), Firefox is using the Windows function localtime.

So I wonder where to fix this issue? Either in the jstz library, or in libkolabxml?
At the moment I have a workaround in /usr/share/roundcubemail/plugins/calendar/drivers/kolab/kolab_calendar.php

I have filed now a bug at the jstz library, because I guess that would be the cleanest solution.
If that ignores Etc timezones coming from the internationalization API from the browser, then it calculates a proper Olson timezone.

https://bitbucket.org/pellepim/jstimezonedetect/issues/168/ignore-timezones-like-etc-gmt-1

machniak claimed this task.
machniak added a project: Roundcube.
machniak subscribed.

Because jsTimezoneDetect is not very active project I decided to add a workaround on PHP side. Fixed in https://github.com/roundcube/roundcubemail/commit/36485dfc345ad724f08eaa7ea30c3cc88e48a00d.

If needed we can also use the new rcube_config::resolve_timezone_alias method in Kolab plugins' code. E.g. might be needed to catch deprecated timezones in input from iTip messages or CalDAV clients.