From 92a24808bd48be7036087c7d4a78c5bd176eb15e Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 19 Aug 2008 14:48:30 +0000 Subject: [PATCH] Monotone-Parent: 1bc4da9c10aec9ded2d443f77aedb8ceeaaf7ce8 Monotone-Revision: 006ff807d8307c52defea735313008dfe94862db Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-08-19T14:48:30 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ UI/Scheduler/UIxAppointmentEditor.m | 19 ++++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0c216435c..820413b16 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-08-19 Wolfgang Sourdeau + + * UI/Scheduler/UIxAppointmentEditor.m ([UIxAppointmentEditor + -viewAction]): apply the user's timezone to the startdate before + formatting it. + 2008-08-18 Ludovic Marcotte * SoObjects/Mailer/SOGoDraftObject.m ([SOGoDraftObject diff --git a/UI/Scheduler/UIxAppointmentEditor.m b/UI/Scheduler/UIxAppointmentEditor.m index 3658bd27f..e4d2277e4 100644 --- a/UI/Scheduler/UIxAppointmentEditor.m +++ b/UI/Scheduler/UIxAppointmentEditor.m @@ -37,11 +37,11 @@ #import #import +#import #import #import #import #import -#import #import #import @@ -272,28 +272,33 @@ - (id ) viewAction { - id result; + WOResponse *result; NSDictionary *data; SOGoAppointmentFolder *co; SOGoDateFormatter *dateFormatter; SOGoUser *user; + NSCalendarDate *startDate; result = [context response]; user = [context activeUser]; co = [self clientObject]; dateFormatter = [user dateFormatterInContext: context]; + [self event]; + startDate = [[event startDate] copy]; + [startDate setTimeZone: [user timeZone]]; data = [NSDictionary dictionaryWithObjectsAndKeys: - [dateFormatter formattedDate: [event startDate]], @"startDate", - [dateFormatter formattedTime: [event startDate]], @"startTime", - ([event hasRecurrenceRules]?@"1":@"0"), @"isReccurent", - ([event isAllDay]?@"1":@"0"), @"isAllDay", + [dateFormatter formattedDate: startDate], @"startDate", + [dateFormatter formattedTime: startDate], @"startTime", + ([event hasRecurrenceRules]? @"1": @"0"), @"isReccurent", + ([event isAllDay] ? @"1": @"0"), @"isAllDay", [event summary], @"summary", [event location], @"location", [event comment], @"description", nil]; - [(WOResponse*)result appendContentString: [data jsonRepresentation]]; + [result appendContentString: [data jsonRepresentation]]; + [startDate release]; return result; }