oc-calendar: Compute PidLidAppointmentDefinitionStartWhole for all-day events

This commit is contained in:
Juan Vallés
2015-05-05 10:29:24 +02:00
parent 7e89c43919
commit ebe2a466e7
+10 -6
View File
@@ -2073,20 +2073,24 @@ ReservedBlockEE2Size: 00 00 00 00
enum mapistore_error rc; enum mapistore_error rc;
iCalTimeZone *icalTZ; iCalTimeZone *icalTZ;
if ([event isRecurrent]) /* [MS-OXOCAL] 3.1.5.5.1: This property is used in floating (all-day) events,
{ specified in floating time, to convert the start date from UTC to the user's
time zone */
if ([event isAllDay])
icalTZ = [iCalTimeZone timeZoneForName: [timeZone timeZoneName]];
else if ([event isRecurrent])
icalTZ = [(iCalDateTime *) [event firstChildWithTag: @"dtstart"] timeZone]; icalTZ = [(iCalDateTime *) [event firstChildWithTag: @"dtstart"] timeZone];
if (icalTZ) if (icalTZ)
{ {
*data = [icalTZ asZoneTimeDefinitionWithFlags: TZRULE_FLAG_EFFECTIVE_TZREG | TZRULE_FLAG_RECUR_CURRENT_TZREG /* [MS-OXOCAL] 2.2.1.42: This property can only have the E flag set in the
TimeZoneDefinition struct */
*data = [icalTZ asZoneTimeDefinitionWithFlags: TZRULE_FLAG_EFFECTIVE_TZREG
inMemCtx: memCtx]; inMemCtx: memCtx];
rc = MAPISTORE_SUCCESS; rc = MAPISTORE_SUCCESS;
} }
else else
rc = MAPISTORE_ERR_NOT_FOUND; rc = MAPISTORE_ERR_NOT_FOUND;
}
else
rc = MAPISTORE_ERR_NOT_FOUND;
return rc; return rc;
} }