oc-calendar: Compute time offset in floating time in all-day recurring events

pull/84/head
Juan Vallés 2015-05-05 10:01:09 +02:00
parent dc5237e92e
commit 7e89c43919
1 changed files with 6 additions and 2 deletions

View File

@ -1461,8 +1461,6 @@ static NSCharacterSet *hexCharacterSet = nil;
firstStartDate = [event firstRecurrenceStartDate];
if (firstStartDate)
{
[firstStartDate setTimeZone: timeZone];
arp = talloc_zero (NULL, struct AppointmentRecurrencePattern);
[rule fillRecurrencePattern: &arp->RecurrencePattern
withEvent: event
@ -1472,6 +1470,12 @@ static NSCharacterSet *hexCharacterSet = nil;
arp->WriterVersion2 = 0x00003008; /* 0x3008 for compatibility with
ol2003 */
/* All day events' dates are specified in floating time
([MS-OXCICAL] 2.1.3.1.1.20.10). The StartTimeOffset and EndTimeOffset
fields are relative to midnight of those days ([MS-OXOCAL] 2.2.1.44.5),
so no time zone adjustment is needed */
if (![event isAllDay])
[firstStartDate setTimeZone: timeZone];
startMinutes = ([firstStartDate hourOfDay] * 60
+ [firstStartDate minuteOfHour]);
arp->StartTimeOffset = startMinutes;