From d0d48fa4349a97cae1def0031163a118446e5656 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 16 Jul 2008 21:46:11 +0000 Subject: [PATCH] Monotone-Parent: d605134489af56b135f39ee30702e7a7953e5bb8 Monotone-Revision: 2ddcd15039e17a87969eaaf79e013a0f2d393679 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-07-16T21:46:11 Monotone-Branch: ca.inverse.sogo --- SOPE/NGCards/ChangeLog | 5 +++++ SOPE/NGCards/iCalDateTime.m | 11 ++++++----- SOPE/NGCards/iCalEvent.m | 1 + 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/SOPE/NGCards/ChangeLog b/SOPE/NGCards/ChangeLog index def66f899..23000a161 100644 --- a/SOPE/NGCards/ChangeLog +++ b/SOPE/NGCards/ChangeLog @@ -1,3 +1,8 @@ +2008-07-16 Wolfgang Sourdeau + + * iCalDateTime.m ([iCalDateTime -setDate:dateTime]): don't set + date in utc. + 2008-07-14 Wolfgang Sourdeau * ICalDateHolder.m: removed class module. diff --git a/SOPE/NGCards/iCalDateTime.m b/SOPE/NGCards/iCalDateTime.m index fe88452e1..722f8669c 100644 --- a/SOPE/NGCards/iCalDateTime.m +++ b/SOPE/NGCards/iCalDateTime.m @@ -118,15 +118,16 @@ } else { - utcTZ = [NSTimeZone timeZoneWithName: @"GMT"]; - tmpTime = [dateTime copy]; - [tmpTime setTimeZone: utcTZ]; if (forAllDayEntity) timeString = [tmpTime iCalFormattedDateString]; else - timeString = [NSString stringWithFormat: @"%@Z", - [tmpTime iCalFormattedDateTimeString]]; + { + utcTZ = [NSTimeZone timeZoneWithName: @"GMT"]; + [tmpTime setTimeZone: utcTZ]; + timeString = [NSString stringWithFormat: @"%@Z", + [tmpTime iCalFormattedDateTimeString]]; + } [tmpTime release]; } } diff --git a/SOPE/NGCards/iCalEvent.m b/SOPE/NGCards/iCalEvent.m index 5e766d230..050f9d9d6 100644 --- a/SOPE/NGCards/iCalEvent.m +++ b/SOPE/NGCards/iCalEvent.m @@ -56,6 +56,7 @@ [(iCalDateTime *) [self uniqueChildWithTag: @"dtstart"] setDate: newStartDate]; endDate = [newStartDate dateByAddingYears: 0 months: 0 days: days]; + [endDate setTimeZone: [newStartDate timeZone]]; [(iCalDateTime *) [self uniqueChildWithTag: @"dtend"] setDate: endDate]; }