Monotone-Parent: a7332f5374e76477d1df1d08f12d1fc7f06af1a7

Monotone-Revision: 6028d3796190e7455c99c97ec20d3ccffbbcf28a

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-03-09T17:08:22
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2010-03-09 17:08:22 +00:00
parent 0d8c134cb1
commit 20f383e85f
2 changed files with 23 additions and 5 deletions

View File

@ -1,5 +1,10 @@
2010-03-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* iCalTimeZone.m (-periodForDate:): the order in which daylight
and standard occur is not the same in the northern and southern
hemisphere. We were thus choosing the wrong period for southern
areas.
* iCalTimeZonePeriod.m (_occurenceForDate:byRRule:): fixed
computing of timezone switch dates, which were offset by one week
too early.

View File

@ -166,13 +166,26 @@ static NSMutableDictionary *cache;
period = (iCalTimeZonePeriod *) [self uniqueChildWithTag: @"daylight"];
else if (!daylightOccurence)
period = (iCalTimeZonePeriod *) [self uniqueChildWithTag: @"standard"];
else if ([date earlierDate: daylightOccurence] == date
|| [date earlierDate: standardOccurence] == standardOccurence)
period = (iCalTimeZonePeriod *) [self uniqueChildWithTag: @"standard"];
else if ([date earlierDate: daylightOccurence] == date)
{
if ([date earlierDate: standardOccurence] == date
&& ([standardOccurence earlierDate: daylightOccurence]
== standardOccurence))
period = (iCalTimeZonePeriod *) [self uniqueChildWithTag: @"daylight"];
else
period = (iCalTimeZonePeriod *) [self uniqueChildWithTag: @"standard"];
}
else
period = (iCalTimeZonePeriod *) [self uniqueChildWithTag: @"daylight"];
{
if ([standardOccurence earlierDate: date] == standardOccurence
&& ([daylightOccurence earlierDate: standardOccurence]
== daylightOccurence))
period = (iCalTimeZonePeriod *) [self uniqueChildWithTag: @"standard"];
else
period = (iCalTimeZonePeriod *) [self uniqueChildWithTag: @"daylight"];
}
// NSLog (@"chosen period: '%@'", [period tag]);
// NSLog (@"chosen period: '%@'", [period tag]);
return period;
}