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) {