diff --git a/ChangeLog b/ChangeLog index 218a668b9..686fa03f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-08-30 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoUserFolder.m ([SOGoUserFolder + -privateContacts:inContext:]): init the SOGoAppointmentFolder's + timezone by taking the current user's timezone setting. + * SoObjects/Appointments/SOGoAptMailNotification.m: same as below. * SoObjects/Appointments/SOGoAppointmentObject.m diff --git a/SoObjects/SOGo/SOGoUserFolder.m b/SoObjects/SOGo/SOGoUserFolder.m index 58defd15c..ba88a954e 100644 --- a/SoObjects/SOGo/SOGoUserFolder.m +++ b/SoObjects/SOGo/SOGoUserFolder.m @@ -22,7 +22,9 @@ #import "SOGoUserFolder.h" #import "WOContext+Agenor.h" #import "common.h" +#import "SOGoUser.h" +#import "Appointments/SOGoAppointmentFolder.h" #import "Contacts/SOGoContactFolders.h" @implementation SOGoUserFolder @@ -86,6 +88,8 @@ - (id)privateCalendar:(NSString *)_key inContext:(id)_ctx { static Class calClass = Nil; id calendar; + NSUserDefaults *userPrefs; + NSTimeZone *timeZone; if (calClass == Nil) calClass = NSClassFromString(@"SOGoAppointmentFolder"); @@ -93,9 +97,14 @@ [self errorWithFormat:@"missing SOGoAppointmentFolder class!"]; return nil; } - + calendar = [[calClass alloc] initWithName:_key inContainer:self]; [calendar setOCSPath:[self ocsPrivateCalendarPath]]; + + userPrefs = [[_ctx activeUser] userDefaults]; + timeZone = [NSTimeZone + timeZoneWithName: [userPrefs stringForKey: @"timezonename"]]; + [calendar setTimeZone: timeZone]; return [calendar autorelease]; }