Hello Andy!
Why do you check for utc_offset != 0 in the following code (from
eas-cal-info-translator.c):
//
// StartTime
//
else if (g_strcmp0 (name, EAS_ELEMENT_STARTTIME) == 0) {
int utc_offset = 0, isDaylight;
icaltimezone * icaltz;
value = (gchar*) xmlNodeGetContent (n);
dateTime = icaltime_from_string (value);
if (isAllDayEvent) {
// Ensure time is set to 00:00:00 for
all-day events
dateTime.is_date = 1;
}
if(vtimezone){
g_debug("got a timezone");
icaltz = icaltimezone_new();
icaltimezone_set_component(icaltz,
vtimezone);
utc_offset =
icaltimezone_get_utc_offset (icaltz, &dateTime, &isDaylight);
if(utc_offset){
icaltime_adjust (&dateTime, 0,
0, 0, utc_offset);
dateTime.is_utc = 0;
}
}
prop = icalproperty_new_dtstart (dateTime);
if (tzid && strlen (tzid)&& (utc_offset != 0))
{ // Note: TZID not specified if it's a UTC time
g_debug("got a tzid, %s", tzid);
param = icalparameter_new_tzid (tzid);
icalproperty_add_parameter (prop,
param);
}
Does't that have the effect that time zone information where the offset
is zero for parts of of the year will be dropped if the event start time
falls into that part of the year?
That would be incorrect for Europe/London, for example.
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
_______________________________________________
SyncEvolution mailing list
[email protected]
http://lists.syncevolution.org/listinfo/syncevolution