diff --git a/ChangeLog b/ChangeLog index 5b20db642..4cf81ee3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-01-12 Wolfgang Sourdeau + + * SoObjects/Appointments/SOGoFreeBusyObject.m ([SOGoFreeBusyObject + -contentAsString]): the default timerange is now 14 days before + currentday and 1 month after. + 2007-01-08 Wolfgang Sourdeau * SoObjects/Appointments/SOGoAppointmentFolder.m diff --git a/SoObjects/Appointments/SOGoFreeBusyObject.m b/SoObjects/Appointments/SOGoFreeBusyObject.m index 1704686ab..d995841a6 100644 --- a/SoObjects/Appointments/SOGoFreeBusyObject.m +++ b/SoObjects/Appointments/SOGoFreeBusyObject.m @@ -46,11 +46,15 @@ - (NSString *) contentAsString { - NSCalendarDate *startDate, *endDate; + NSCalendarDate *today, *startDate, *endDate; - startDate = [[[NSCalendarDate calendarDate] mondayOfWeek] beginOfDay]; - endDate = [startDate dateByAddingYears: 0 months: 0 days: 7 - hours: 23 minutes: 59 seconds: 59]; + today = [[NSCalendarDate calendarDate] beginOfDay]; + [today setTimeZone: [self userTimeZone]]; + + startDate = [today dateByAddingYears: 0 months: 0 days: -14 + hours: 0 minutes: 0 seconds: 0]; + endDate = [startDate dateByAddingYears: 0 months: 1 days: 0 + hours: 0 minutes: 0 seconds: 0]; return [self contentAsStringFrom: startDate to: endDate]; }