Re: zogi and daylight savings

Adam Tauno Williams <[email protected]> Fri, 11 Sep 2009 13:12:07 -0400
Newsgroups gmane.comp.cms.opengroupware.xmlrpc.devel
Message-ID <1252689127.4839.18.camel@linux-m3mt>
     A. On Wed, 2009-08-26 at 05:41 +0200, Tobias Kaefer wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> On Tue Aug 25 2009 17:29:49 GMT+0200 (CEST) , Adam Tauno Williams wrote:
> > On Mon, 2009-06-15 at 11:27 +0200, Tobias Kaefer wrote:
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >> On Mon Jun 08 2009 19:14:53 GMT+0200 (CEST), Adam Tauno WIlliams wrote:
> >>> <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>
> >> After knowing where to do some patching, the issue is very easy to
> >> solve. I provided a patch for that (see
> >> http://code.google.com/p/zogi/issues/detail?id=33#c5).
> >> It's basically just this:
> >> <quote>
> >> dateValue = [NSCalendarDate dateWithYear:[dateValue yearOfCommonEra]
> >>                                month:[dateValue monthOfYear]
> >>                                day:[dateValue dayOfMonth]
> >>                                hour:[dateValue hourOfDay]
> >>                                minute:[dateValue minuteOfHour]
> >>                                second:[dateValue secondOfMinute]
> >>                                timeZone:timeZone];
> >> </quote>
> > How has this patch been working out for you? Any unforseen side effects?
> No side effects so far. Everything is fine.

This is applied to zOGI r1014.  I'll push this into the servers this
weekend and run some tests,  if it looks OK I'll flip it into ZideStore
next week.

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