oc-calendar: Compute time offset in floating time in all-day recurring events
This commit is contained in:
parent
dc5237e92e
commit
7e89c43919
|
@ -1461,8 +1461,6 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
firstStartDate = [event firstRecurrenceStartDate];
|
firstStartDate = [event firstRecurrenceStartDate];
|
||||||
if (firstStartDate)
|
if (firstStartDate)
|
||||||
{
|
{
|
||||||
[firstStartDate setTimeZone: timeZone];
|
|
||||||
|
|
||||||
arp = talloc_zero (NULL, struct AppointmentRecurrencePattern);
|
arp = talloc_zero (NULL, struct AppointmentRecurrencePattern);
|
||||||
[rule fillRecurrencePattern: &arp->RecurrencePattern
|
[rule fillRecurrencePattern: &arp->RecurrencePattern
|
||||||
withEvent: event
|
withEvent: event
|
||||||
|
@ -1472,6 +1470,12 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
arp->WriterVersion2 = 0x00003008; /* 0x3008 for compatibility with
|
arp->WriterVersion2 = 0x00003008; /* 0x3008 for compatibility with
|
||||||
ol2003 */
|
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
|
startMinutes = ([firstStartDate hourOfDay] * 60
|
||||||
+ [firstStartDate minuteOfHour]);
|
+ [firstStartDate minuteOfHour]);
|
||||||
arp->StartTimeOffset = startMinutes;
|
arp->StartTimeOffset = startMinutes;
|
||||||
|
|
Loading…
Reference in a new issue