From e859ba4123e3e30d34bb754ac400c9ada87d6664 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 8 Oct 2010 16:19:55 +0000 Subject: [PATCH] Monotone-Parent: b54a4a89914eab992aa8dfa993817ad238c63a44 Monotone-Revision: 5348ab1ab933a8576fbc1f77ec5f02aab187101c Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-10-08T16:19:55 Monotone-Branch: ca.inverse.sogo --- SOPE/NGCards/ChangeLog | 4 ++++ SOPE/NGCards/iCalEvent.m | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/SOPE/NGCards/ChangeLog b/SOPE/NGCards/ChangeLog index e32ca7c60..f3dcd4881 100644 --- a/SOPE/NGCards/ChangeLog +++ b/SOPE/NGCards/ChangeLog @@ -1,5 +1,9 @@ 2010-10-08 Wolfgang Sourdeau + * iCalEvent.m (-setAllDayWithStartDate:duration:): added a + work-around for bug 866, by adding one hour in addition to the + offset in days from the start date. + * NSString+NGCards.m (-unescapedFromCard): removed obsolete method. (-componentsWithSafeSeparator:): renamed to diff --git a/SOPE/NGCards/iCalEvent.m b/SOPE/NGCards/iCalEvent.m index 3bbde5c50..3afe3b071 100644 --- a/SOPE/NGCards/iCalEvent.m +++ b/SOPE/NGCards/iCalEvent.m @@ -57,7 +57,9 @@ [(iCalDateTime *) [self uniqueChildWithTag: @"dtstart"] setDate: newStartDate]; - endDate = [newStartDate dateByAddingYears: 0 months: 0 days: days]; + // HACK: we add 1 hour to avoid losing a day on time shift dates + endDate = [newStartDate dateByAddingYears: 0 months: 0 days: days + hours: 1 minutes: 0 seconds: 0]; [endDate setTimeZone: [newStartDate timeZone]]; [(iCalDateTime *) [self uniqueChildWithTag: @"dtend"] setDate: endDate];