Monotone-Parent: 164d0ac238e069b138546ff280879bd831709536

Monotone-Revision: 7bb42646015cb99b0c6dfe942e088aba59cc5991

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-05-21T21:30:33
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2010-05-21 21:30:33 +00:00
parent f087d8e4f7
commit d2ca80f4b4
2 changed files with 13 additions and 4 deletions

View File

@@ -1,5 +1,8 @@
2010-05-21 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* 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.

View File

@@ -19,6 +19,8 @@
02111-1307, USA.
*/
#import <Foundation/NSCalendarDate.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGCards/iCalEvent.h>
#import <NGCards/iCalEventChanges.h>
@@ -27,6 +29,7 @@
#import <SOGo/NSObject+Utilities.h>
#import <SOGo/SOGoDateFormatter.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserDefaults.h>
#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