diff --git a/ChangeLog b/ChangeLog index 7ed35e0ba..3a349ebdd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-05-21 Wolfgang Sourdeau + * SoObjects/Appointments/SOGoAptMailUpdate.m (-valueForProperty:): + set the timezone of date objects to the active user's timezone. + * UI/WebServerResources/SchedulerUI.js: (resetCategoriesStyles): fixed an exception occurring when UserDefaults['SOGoCalendarCategoriesColors'] is undefined. diff --git a/SoObjects/Appointments/SOGoAptMailUpdate.m b/SoObjects/Appointments/SOGoAptMailUpdate.m index 4fa3eb5d5..90ed63705 100644 --- a/SoObjects/Appointments/SOGoAptMailUpdate.m +++ b/SoObjects/Appointments/SOGoAptMailUpdate.m @@ -19,6 +19,8 @@ 02111-1307, USA. */ +#import + #import #import #import @@ -27,6 +29,7 @@ #import #import #import +#import #import "SOGoAptMailNotification.h" @@ -38,9 +41,10 @@ - (NSString *) valueForProperty: (NSString *) property { static NSDictionary *valueTypes = nil; - SOGoDateFormatter *dateFormatter; NSString *valueType; id value; + SOGoUser *user; + NSTimeZone *userTZ; if (!valueTypes) { @@ -61,9 +65,11 @@ value = [(iCalEvent *) apt propertyValue: property]; if ([valueType isEqualToString: @"date"]) { - dateFormatter = [[context activeUser] - dateFormatterInContext: context]; - value = [dateFormatter formattedDateAndTime: value]; + user = [context activeUser]; + userTZ = [[user userDefaults] timeZone]; + [value setTimeZone: userTZ]; + value = [[user dateFormatterInContext: context] + formattedDateAndTime: value]; } } else