From ea49933a1aa33e12137fe319e84500dac92e0487 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 4 Oct 2006 19:19:38 +0000 Subject: [PATCH] Monotone-Parent: b6562cfc2be0b285ef7b97891b12497ca0e09dd8 Monotone-Revision: d4191b6ff0161c67b15e1e4cbdaf5106cfac70fc Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-10-04T19:19:38 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ Main/sogod.m | 20 ++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e714e3594..d8b930b4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-10-04 Wolfgang Sourdeau + + * Main/sogod.m (main): initialize the NSTimeZone's defaultTimeZone + to the value of SOGoServerTimeZone or "Canada/Eastern" if not found. + 2006-10-03 Wolfgang Sourdeau * UI/WebServerResources/SchedulerUI.js: added code to scroll the diff --git a/Main/sogod.m b/Main/sogod.m index 314a248ce..ab5c895f7 100644 --- a/Main/sogod.m +++ b/Main/sogod.m @@ -19,10 +19,16 @@ 02111-1307, USA. */ -#include -#include "common.h" +#import +#import -int main(int argc, char **argv, char **env) { +#import +#import "common.h" + +int main(int argc, char **argv, char **env) +{ + NSString *tzName; + NSUserDefaults *ud; NSAutoreleasePool *pool; pool = [[NSAutoreleasePool alloc] init]; @@ -30,7 +36,13 @@ int main(int argc, char **argv, char **env) { [NSProcessInfo initializeWithArguments:argv count:argc environment:env]; #endif [NGBundleManager defaultBundleManager]; - + + ud = [NSUserDefaults standardUserDefaults]; + tzName = [ud stringForKey: @"SOGoServerTimeZone"]; + if (!tzName) + tzName = @"Canada/Eastern"; + [NSTimeZone setDefaultTimeZone: [NSTimeZone timeZoneWithName: tzName]]; + WOWatchDogApplicationMain(@"SOGo", argc, (void*)argv); [pool release];