From 79c7a7ef2a9f7f8e74d5d0ecaf4fa9e938ae2d48 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 30 Aug 2006 23:11:12 +0000 Subject: [PATCH] Monotone-Parent: ec19e489c1141c5a5e5a204abf81543a2ff2f463 Monotone-Revision: 9d86e187092bc677ee3ceb2cb3b127b1510b076f Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-08-30T23:11:12 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ SoObjects/SOGo/SOGoUserFolder.m | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) 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]; }