From 5f81312c638986af0a98abe56ff54482f3bb5e7e Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 29 Nov 2007 19:43:51 +0000 Subject: [PATCH] Monotone-Parent: 49e9c5bd210d89a7731744a1af6593223adab775 Monotone-Revision: ed60dc2436a8163bc04661e1f66b3a3d30c2284c Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-11-29T19:43:51 Monotone-Branch: ca.inverse.sogo --- SOPE/NGCards/ChangeLog | 5 +++++ SOPE/NGCards/iCalDateTime.m | 18 ++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/SOPE/NGCards/ChangeLog b/SOPE/NGCards/ChangeLog index e13917d67..3ddc72939 100644 --- a/SOPE/NGCards/ChangeLog +++ b/SOPE/NGCards/ChangeLog @@ -1,3 +1,8 @@ +2007-11-29 Wolfgang Sourdeau + + * iCalDateTime.m ([iCalDateTime -timeZone]): log a message if the + corresponding timezone isn't found. + 2007-11-26 Wolfgang Sourdeau * iCalCalendar.m ([iCalCalendar -versitString]): same as below, diff --git a/SOPE/NGCards/iCalDateTime.m b/SOPE/NGCards/iCalDateTime.m index 127be961a..159545e81 100644 --- a/SOPE/NGCards/iCalDateTime.m +++ b/SOPE/NGCards/iCalDateTime.m @@ -23,6 +23,8 @@ #import #import +#import + #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; }