Re: zogi and daylight savings

Adam Tauno WIlliams <[email protected]> Mon, 08 Jun 2009 13:14:53 -0400
Newsgroups gmane.comp.cms.opengroupware.xmlrpc.devel
Message-ID <[email protected]>
On Mon, 2009-06-08 at 10:38 +0200, Tobias Kaefer wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> BTW:
> The legacy XML-RPC-API has the same issue as zOGI has!
> I just gave it a try (as a fallback solution until this is fixed in zOGI).
> That is really annoying.

It is an effect of the implementation,  if I create an appointment via
zOGI the new appointment command gets -

[appointment::new] New Appointment; start: time2008-10-24 14:00:00 -0000
[appointment::new] New Appointment; start zone: GMT +00:00:00
[appointment::new] New Appointment; end time: 2008-10-24 15:00:00 -0000
[appointment::new] New Appointment; end zone: GMT +00:00:00
[appointment::new-cyclic] New Cyclic Appointment; start time: 2008-10-25
14:00:00 -0000
[appointment::new-cyclic] New Cyclic Appointment; start zone: GMT
+00:00:00
[appointment::new-cyclic] New Cyclic Appointment; end time: 2008-10-25
15:00:00 -0000
[appointment::new-cyclic] New Cyclic Appointment; end zone: GMT
+00:00:00

zOGI (and the old XML-RPC daemon) times are all in GMT (this happens in
zOGIAction's _makeCalendarDate function;  which converts the value to
GMT and strips the time zone.

<quote>
  /* if we successfuly aquired a date then make an adjustment to
     GMT if a timezone was provided;  GMT values are not changed. */
  if ([dateValue isNotNull]) {
    zoneDiff = [timeZone secondsFromGMTForDate:dateValue];
    if (zoneDiff != 0) {
      dateValue = [dateValue dateByAddingYears:0
                                        months:0
                                          days:0
                                         hours:0
                                       minutes:0
                                       seconds:(zoneDiff * -1)];
  [dateValue setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"GMT"]];
  return dateValue;
</quote>

On the other hand if I do it via the webui the appointment::new command
receives -
[appointment::new] New Appointment; start: time2008-10-24 11:00:00 +0200
[appointment::new] New Appointment; strart zone: MET DST +02:00:00
[appointment::new] New Appointment; end time: 2008-10-24 12:00:00 +0200
[appointment::new] New Appointment; end zone: MET DST +02:00:00

The command's parameters have a time zone;  which then [of course] is
provided to the subsequent appointment::cyclic-appointment command.

I'll make a fix to not convert to GMT for schedular operations if a
timeZone was provided; it looks like it should still work.

> >>>> http://code.google.com/p/zogi/issues/detail?id=33


-- 
OpenGroupware.org XML-RPC
[email protected]
http://mail.opengroupware.org/mailman/listinfo/xmlrpc