diff --git a/SoObjects/Appointments/SOGoAptMailNotification.m b/SoObjects/Appointments/SOGoAptMailNotification.m index e95de69d0..c3c125522 100644 --- a/SoObjects/Appointments/SOGoAptMailNotification.m +++ b/SoObjects/Appointments/SOGoAptMailNotification.m @@ -106,7 +106,8 @@ if (!oldStartDate) { ASSIGN (oldStartDate, [[self previousApt] startDate]); - [oldStartDate setTimeZone: viewTZ]; + if (![(iCalEvent*)[self previousApt] isAllDay]) + [oldStartDate setTimeZone: viewTZ]; } return oldStartDate; } @@ -116,33 +117,50 @@ if (!newStartDate) { ASSIGN (newStartDate, [[self apt] startDate]); - [newStartDate setTimeZone: viewTZ]; + if (![(iCalEvent*)[self apt] isAllDay]) + [newStartDate setTimeZone: viewTZ]; } return newStartDate; } - (NSCalendarDate *) oldEndDate { + NSCalendarDate *endDate; + if (!oldEndDate) { if ([[self previousApt] isKindOfClass: [iCalEvent class]]) - ASSIGN (oldEndDate, [(iCalEvent*)[self previousApt] endDate]); + { + endDate = [(iCalEvent*)[self previousApt] endDate]; + if ([(iCalEvent*)[self previousApt] isAllDay]) + endDate = [endDate dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:-1]; + ASSIGN (oldEndDate, endDate); + } else ASSIGN (oldEndDate, [(iCalToDo*)[self previousApt] due]); - [oldEndDate setTimeZone: viewTZ]; + if (![(iCalEvent*)[self previousApt] isAllDay]) + [oldEndDate setTimeZone: viewTZ]; } return oldEndDate; } - (NSCalendarDate *) newEndDate { + NSCalendarDate *endDate; + if (!newEndDate) { if ([[self apt] isKindOfClass: [iCalEvent class]]) - ASSIGN (newEndDate, [(iCalEvent*)[self apt] endDate]); + { + endDate = [(iCalEvent*)[self apt] endDate]; + if ([(iCalEvent*)[self apt] isAllDay]) + endDate = [endDate dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:-1]; + ASSIGN (newEndDate, endDate); + } else ASSIGN (newEndDate, [(iCalToDo*)[self apt] due]); - [newEndDate setTimeZone: viewTZ]; + if (![(iCalEvent*)[self apt] isAllDay]) + [newEndDate setTimeZone: viewTZ]; } return newEndDate; } diff --git a/UI/MailPartViewers/UIxMailPartICalViewer.m b/UI/MailPartViewers/UIxMailPartICalViewer.m index 1a9bb1e30..8f900c452 100644 --- a/UI/MailPartViewers/UIxMailPartICalViewer.m +++ b/UI/MailPartViewers/UIxMailPartICalViewer.m @@ -143,7 +143,8 @@ date = [[self inEvent] startDate]; ud = [[context activeUser] userDefaults]; - [date setTimeZone: [ud timeZone]]; + if (![[self inEvent] isAllDay]) + [date setTimeZone: [ud timeZone]]; return date; } @@ -186,12 +187,12 @@ if ([self isEndDateOnSameDay] && ![[self inEvent] isAllDay]) { - [s appendFormat: @" %@", [self labelForKey: @"to"]]; + [s appendFormat: @" %@", [self labelForKey: @"to_time"]]; [s appendFormat: @" %@", [self endTime]]; } else if (![self isEndDateOnSameDay]) { - [s appendFormat: @" %@", [self labelForKey: @"to"]]; + [s appendFormat: @" %@", [self labelForKey: @"to_date"]]; [s appendFormat: @" %@", [self endDate]]; if (![[self inEvent] isAllDay]) @@ -218,7 +219,8 @@ date = [[self inEvent] endDate]; ud = [[context activeUser] userDefaults]; - [date setTimeZone: [ud timeZone]]; + if (![[self inEvent] isAllDay]) + [date setTimeZone: [ud timeZone]]; return date; } diff --git a/UI/MailerUI/English.lproj/Localizable.strings b/UI/MailerUI/English.lproj/Localizable.strings index 2ce267cdb..0a065b513 100644 --- a/UI/MailerUI/English.lproj/Localizable.strings +++ b/UI/MailerUI/English.lproj/Localizable.strings @@ -251,6 +251,12 @@ /* Number of selected messages in list */ "selected" = "selected"; +/* Date formatting from one time to another time */ +"to_time" = "to"; + +/* Date formatting from one day to another day */ +"to_date" = "to"; + /* Encrypted message notification */ "This message is encrypted" = "This message is encrypted"; diff --git a/UI/MailerUI/French.lproj/Localizable.strings b/UI/MailerUI/French.lproj/Localizable.strings index 3be0c2b5e..d9c3f8147 100644 --- a/UI/MailerUI/French.lproj/Localizable.strings +++ b/UI/MailerUI/French.lproj/Localizable.strings @@ -251,6 +251,12 @@ /* Number of selected messages in list */ "selected" = "sélectionné(s)"; +/* Date formatting from one time to another time */ +"to_time" = "à"; + +/* Date formatting from one day to another day */ +"to_date" = "au"; + /* Encrypted message notification */ "This message is encrypted" = "Ce message est crypté"; diff --git a/UI/Templates/Appointments/SOGoAptMailDeletion.wox b/UI/Templates/Appointments/SOGoAptMailDeletion.wox index c5daf29a6..b7afa4b5a 100644 --- a/UI/Templates/Appointments/SOGoAptMailDeletion.wox +++ b/UI/Templates/Appointments/SOGoAptMailDeletion.wox @@ -19,11 +19,21 @@ th, td { font-family: Lucida Grande, Bitstream VeraSans, Tahoma, sans-serif; fon padding-bottom: 9px; border-bottom: 1px solid #ccc;" class="ng-hide"> - - + + + + + + + + + + - - + +