Kolab 3.0: event timezone
Thomas Brüderli
bruederli at kolabsys.com
Wed Jul 4 15:21:15 CEST 2012
Aleksander Machniak wrote:
> I'm working on ActiveSync implementation. In ActiveSync Timezone is a
> "global" setting of calendar event/task item. In specification described
> as "The Timezone element is an optional element that specifies the time
> zone of the calendar item". (All dates are in UTC).
>
> I don't see such global (per-object) setting in Kolab Format XML 3.0.
> So, is it possible to detect timezone of the event?
The new Kolab XML/xCal has timezone support for each individual
date-time attribute. That is also reflected in in the cDateDime objects
from libkolabxml as well as in the PHP DateTime objects derived from
them. You don't need to "detect" timezone information of a Kolab object,
it's already in the DateTime attributes you read/write.
In regular cases, all date-time attributes of a Kolab object have the
same timezone, so I'd suggest to take the timezone information from the
first attribute (e.g. dtstart) and use that as the global setting in
ActiveSync. Then make sure you set timezones for all attributes to UTC
before writing to ActiveSync.
> Also, what should I
> do with Timezone when importing events from Activesync into Kolab.
My suggestion would be to create DateTime objects in UTC for all
attributes from ActiveSync and if that global timezone setting is
present, apply it to all the DateTime attributes before passing them to
libkolabxml.
~Thomas
More information about the format
mailing list