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; }