From 332508e2dbb1e238d1b9d0a11ea9188dabb4f865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Vall=C3=A9s?= Date: Tue, 15 Dec 2015 10:40:19 +0100 Subject: [PATCH] oc-calendar: Use signed integer for time zone biases This change adapts the bias fields in the TimeZoneStruct and TZRule structures to the changes in openchange that allow this offsets to be negative (zentyal/openchange bba372faea29d942b9471e6bed90bf425dc4b231) --- OpenChange/iCalTimeZone+MAPIStore.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OpenChange/iCalTimeZone+MAPIStore.m b/OpenChange/iCalTimeZone+MAPIStore.m index f692272db..9a9e8fbb2 100644 --- a/OpenChange/iCalTimeZone+MAPIStore.m +++ b/OpenChange/iCalTimeZone+MAPIStore.m @@ -103,18 +103,18 @@ { iCalTimeZonePeriod *period; struct TimeZoneStruct tz; - int lBias, dlBias; + int32_t lBias, dlBias; memset (&tz, 0, sizeof (struct TimeZoneStruct)); period = [self _mostRecentPeriodWithName: @"STANDARD"]; lBias = -[period secondsOffsetFromGMT] / 60; - tz.lBias = (uint32_t) lBias; + tz.lBias = lBias; [period _fillTZDate: &tz.stStandardDate]; period = [self _mostRecentPeriodWithName: @"DAYLIGHT"]; if (!period) tz.stStandardDate.wMonth = 0; dlBias = -([period secondsOffsetFromGMT] / 60) - lBias; - tz.lDaylightBias = (uint32_t) (dlBias); + tz.lDaylightBias = dlBias; [period _fillTZDate: &tz.stDaylightDate]; tz.wStandardYear = tz.stStandardDate.wYear; tz.wDaylightYear = tz.stDaylightDate.wYear; @@ -153,13 +153,13 @@ period = [self _mostRecentPeriodWithName: @"STANDARD"]; rule.wYear = [[period startDate] yearOfCommonEra]; lBias = -[period secondsOffsetFromGMT] / 60; - rule.lBias = (uint32_t) lBias; + rule.lBias = lBias; [period _fillTZDate: &rule.stStandardDate]; period = [self _mostRecentPeriodWithName: @"DAYLIGHT"]; if (!period) rule.stStandardDate.wMonth = 0; dlBias = -([period secondsOffsetFromGMT] / 60) - lBias; - rule.lDaylightBias = (uint32_t) (dlBias); + rule.lDaylightBias = dlBias; [period _fillTZDate: &rule.stDaylightDate];