Monotone-Parent: 49e9c5bd210d89a7731744a1af6593223adab775

Monotone-Revision: ed60dc2436a8163bc04661e1f66b3a3d30c2284c

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-11-29T19:43:51
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2007-11-29 19:43:51 +00:00
parent 7dfc20e461
commit 5f81312c63
2 changed files with 17 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2007-11-29 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* iCalDateTime.m ([iCalDateTime -timeZone]): log a message if the
corresponding timezone isn't found.
2007-11-26 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* iCalCalendar.m ([iCalCalendar -versitString]): same as below,

View File

@ -23,6 +23,8 @@
#import <Foundation/NSString.h>
#import <Foundation/NSTimeZone.h>
#import <NGExtensions/NSObject+Logs.h>
#import "NSCalendarDate+NGCards.h"
#import "NSString+NGCards.h"
@ -76,13 +78,17 @@
NSString *tzId;
iCalTimeZone *timeZone;
timeZone = nil;
tzId = [self value: 0 ofAttribute: @"tzid"];
calendar
= (iCalCalendar *) [self searchParentOfClass: [iCalCalendar class]];
if ([tzId length] && calendar)
timeZone = [calendar timeZoneWithId: tzId];
else
timeZone = nil;
if ([tzId length])
{
calendar
= (iCalCalendar *) [self searchParentOfClass: [iCalCalendar class]];
timeZone = [calendar timeZoneWithId: tzId];
if (!timeZone)
[self logWithFormat: @"timezone '%@' not found in calendar", tzId];
}
return timeZone;
}