[OGo-XML-RPC] zOGI and timeZone

Adam Tauno Williams xmlrpc@opengroupware.org
Thu, 24 Apr 2008 09:41:27 -0400


> >> 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.
> I recognized that to. But since I need the timeZone in sope-operations
> for this recurrence issue, I tested it with
> ...
> zoneDiff = [timeZone secondsFromGMTForDate:dateValue];
>    if (zoneDiff != 0){
>        dateValue = [dateValue dateByAddingYears:0
>                                          months:0
>                                            days:0
>                                           hours:0
>                                         minutes:0
>                                         seconds:(zoneDiff * -1)];
>        [dateValue setTimeZone:timeZone]
>    }
> ...
> And that works - strangely but it does. You get the right
> appointment-date(s) set in the DB and the timeZone is available for
> other operations in OGO, Zidestore and Sope.

Awesome.  I'm really confused how the timezone in the date objects is
*supposed* to work - my understanding just comes from kicking the thing
until it does what I want.

zOGI r968 on Google Code now has this;  I'll run it through my tests.