From 3984092f08272c230557fc23a3150c072d33de75 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 5 Sep 2006 21:53:47 +0000 Subject: [PATCH] Monotone-Parent: 69ec7c5e5b614344af143a54ceb32686d3daa756 Monotone-Revision: bf42b4068082eb38268bdf4f7034597312c2bb7c Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-09-05T21:53:47 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 3 ++- UI/SOGoUI/UIxComponent.m | 20 +++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 144699c61..2904bdb48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,7 +2,8 @@ * UI/SOGoUI/UIxComponent.m ([UIxComponent -selectedDate]): add the user's timezone abbreviation to the date string passed as parameter to - NSCalendarDate to generate an accurate date instance. + NSCalendarDate to generate an accurate date instance. Do the same + when no date is specified and today is chosen. * UI/WebServerResources/UIxAppointmentEditor.js: convert the form's time values to integers before comparing them. diff --git a/UI/SOGoUI/UIxComponent.m b/UI/SOGoUI/UIxComponent.m index 590b36c86..1bc1e386a 100644 --- a/UI/SOGoUI/UIxComponent.m +++ b/UI/SOGoUI/UIxComponent.m @@ -379,14 +379,20 @@ static BOOL uixDebugEnabled = NO; { s = [self queryParameterForKey: @"day"]; if ([s length] > 0) - { - dateString = [s stringByAppendingFormat: @" %@", - [[self viewTimeZone] abbreviation]]; - cdate = [NSCalendarDate dateWithString: dateString - calendarFormat: @"%Y%m%d %Z"]; - } + dateString = [s stringByAppendingFormat: @" %@", + [[self viewTimeZone] abbreviation]]; else - cdate = [NSCalendarDate date]; + { + cdate = [NSCalendarDate calendarDate]; + dateString = [NSString stringWithFormat: @"%d%d%d %@", + [cdate yearOfCommonEra], + [cdate monthOfYear], + [cdate dayOfMonth], + [[self viewTimeZone] abbreviation]]; + } + + cdate = [NSCalendarDate dateWithString: dateString + calendarFormat: @"%Y%m%d %Z"]; s = [self queryParameterForKey: @"hm"]; if ([s length] == 4) {