[OGo-XML-RPC] zOGI and timeZone

Adam Tauno Williams xmlrpc@opengroupware.org
Thu, 24 Apr 2008 08:49:39 -0400


> during my testing of the last patch I provided for sope (see
> http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1964), I came
> tried to fix one issue with timeZone(s) and recurrend "all day"
> appointments. I recognized, that a timeZone that is given in a zOGI
> "zogi.putObject"-command is not passed through the code. I did some
> research and found that the times are converted by adding the time-delta
> (timeZone to GMT) in zOGIAction.m, (NSCalendarDate
> *)_makeCalendarDate:(id)_date withZone:(id)_zone
> Line 441 to 448:
> ~    zoneDiff = [timeZone secondsFromGMTForDate:dateValue];
> ~    if (zoneDiff != 0)
> ~      dateValue = [dateValue dateByAddingYears:0
> ~                                        months:0
> ~                                          days:0
> ~                                         hours:0
> ~                                       minutes:0
> ~                                       seconds:(zoneDiff * -1)];
> Wouldn't it be better to do it in a way like this: (??)
> [dateValue setTimeZone:timeZone]

Possibly.  But I recall having a bear of a time getting timezones to
work correctly; and the "[dateValue setTimeZone:timeZone]" (looking at
my notes) was essentially a no-op (it had no effect at all), resulting
in the kludge seen above.