diff --git a/ChangeLog b/ChangeLog index a68b1882b..022d30775 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2009-01-07 Francis Lachapelle + + * UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor + -_handleCustomRRule:]): set the proper timezone for the end date. + ([UIxComponentEditor -_loadRRules]): idem. + + * UI/Scheduler/UIxAppointmentEditor.m ([UIxAppointmentEditor + -saveAction]): for recurrent events with an end date, the method + _adjustRecurrentRules must be called unconditionally. This fixes + the missing occurence on the last day. + ([UIxAppointmentEditor -_adjustRecurrentRules]): fixed adjustment + of end date by using the proper timezone. + 2009-01-07 Wolfgang Sourdeau * SoObjects/SOGo/NSString+Utilities.m ([NSString @@ -6,13 +19,6 @@ algorithm used in jsonRepresentation, the latter is now calling this new method. -2009-01-07 Francis Lachapelle - - * UI/Scheduler/UIxAppointmentEditor.m ([UIxAppointmentEditor - -saveAction]): for recurrent events with an end date, the method - _adjustRecurrentRules must be called unconditionally. This fixes - the missing occurence on the last day. - 2008-01-06 Ludovic Marcotte * SoObjects/Appointments/SOGoCalendarComponent.m diff --git a/UI/Scheduler/UIxAppointmentEditor.m b/UI/Scheduler/UIxAppointmentEditor.m index 6bc79dd69..1b8278755 100644 --- a/UI/Scheduler/UIxAppointmentEditor.m +++ b/UI/Scheduler/UIxAppointmentEditor.m @@ -310,13 +310,16 @@ if (untilDate) { // The until date must match the time of the start date - untilDate = [untilDate initWithYear: [untilDate yearOfCommonEra] - month: [untilDate monthOfYear] - day: [untilDate dayOfMonth] - hour: [[event startDate] hourOfDay] - minute: [[event startDate] minuteOfHour] - second: 0 - timeZone: [untilDate timeZone]]; + NSCalendarDate *date; + + date = [[event startDate] copy]; + [date setTimeZone: [[context activeUser] timeZone]]; + untilDate = [untilDate dateByAddingYears:0 + months:0 + days:0 + hours:[date hourOfDay] + minutes:[date minuteOfHour] + seconds:0]; [rule setUntilDate: untilDate]; } } diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 8c2e5f98d..ac701a7f2 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -37,6 +37,7 @@ #import #import #import +#import #import #import #import @@ -340,8 +341,12 @@ iRANGE(2); } else if ([rule untilDate]) { + NSCalendarDate *date; + + date = [[rule untilDate] copy]; + [date setTimeZone: [[context activeUser] timeZone]]; [self setRange1: @"2"]; - [self setRange2: [[rule untilDate] descriptionWithCalendarFormat: @"%Y-%m-%d"]]; + [self setRange2: [date descriptionWithCalendarFormat: @"%Y-%m-%d"]]; } else [self setRange1: @"0"]; @@ -1387,8 +1392,14 @@ RANGE(2); // Repeat until date else if (range == 2) { - [theRule setUntilDate: [NSCalendarDate dateWithString: [self range2] - calendarFormat: @"%Y-%m-%d"]]; + NSCalendarDate *date; + SOGoUser *user; + + user = [context activeUser]; + date = [NSCalendarDate dateWithString: [self range2] + calendarFormat: @"%Y-%m-%d" + locale: [[WOApplication application] localeForLanguageNamed: [user language]]]; + [theRule setUntilDate: date]; } // No end date. else