From c8d8a587b8adab7959cbe357e30a8e3e5f86d303 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 16 Jul 2010 02:21:01 +0000 Subject: [PATCH] Monotone-Parent: 77a1a396ead2722d4c170d71c3f90eb39e0a4eee Monotone-Revision: fa40d65d7c930f25d8bdbc5eb255f787fa05626f Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-07-16T02:21:01 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 1 + UI/Scheduler/UIxCalListingActions.m | 33 ++++++++++++++--------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 229527c5e..3fe3766f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ * UI/Scheduler/UIxCalListingActions.m (_aptFolder:withClientObject:): removed unused method. + (_fixDates:): apply fix also for monthly views. * UI/WebServerResources/UIxAppointmentEditor.js (onComposeToAllAttendees): take the status image DIV into account diff --git a/UI/Scheduler/UIxCalListingActions.m b/UI/Scheduler/UIxCalListingActions.m index 3329bb799..8e4df8e5d 100644 --- a/UI/Scheduler/UIxCalListingActions.m +++ b/UI/Scheduler/UIxCalListingActions.m @@ -256,23 +256,22 @@ static NSArray *tasksFields = nil; static NSString *fields[] = { @"startDate", @"c_startdate", @"endDate", @"c_enddate" }; - if (dayBasedView) - for (count = 0; count < 2; count++) - { - aDateField = fields[count * 2]; - aDate = [aRecord objectForKey: aDateField]; - daylightOffset = (int) ([userTimeZone secondsFromGMTForDate: aDate] - - [userTimeZone secondsFromGMTForDate: startDate]); - if (daylightOffset) - { - aDate = [aDate dateByAddingYears: 0 months: 0 days: 0 hours: 0 - minutes: 0 seconds: daylightOffset]; - [aRecord setObject: aDate forKey: aDateField]; - aDateValue = [NSNumber numberWithInt: [aDate timeIntervalSince1970]]; - [aRecord setObject: aDateValue forKey: fields[count * 2 + 1]]; - } - } - + for (count = 0; count < 2; count++) + { + aDateField = fields[count * 2]; + aDate = [aRecord objectForKey: aDateField]; + daylightOffset = (int) ([userTimeZone secondsFromGMTForDate: aDate] + - [userTimeZone secondsFromGMTForDate: startDate]); + if (daylightOffset) + { + aDate = [aDate dateByAddingYears: 0 months: 0 days: 0 hours: 0 + minutes: 0 seconds: daylightOffset]; + [aRecord setObject: aDate forKey: aDateField]; + aDateValue = [NSNumber numberWithInt: [aDate timeIntervalSince1970]]; + [aRecord setObject: aDateValue forKey: fields[count * 2 + 1]]; + } + } + aDateValue = [aRecord objectForKey: @"c_recurrence_id"]; aDate = [aRecord objectForKey: @"cycleStartDate"]; if (aDateValue && aDate)