Re: zogi and daylight savings
Tobias Kaefer <[email protected]> Mon, 15 Jun 2009 11:27:49 +0200
| Newsgroups | gmane.comp.cms.opengroupware.xmlrpc.devel |
|---|---|
| Message-ID | <[email protected]> |
-----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>
Maybe to much overhead, with createing a new NSCalendarDate-Object.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAko2FBEACgkQdJJ1JNEzpd2nYACcDb9Ea4su54Xh1UXUC4scvo1x
5BYAn2PULcphiRK3Wwyi0g4V2HvZl39L
=Ih3U
-----END PGP SIGNATURE-----
--
OpenGroupware.org XML-RPC
[email protected]
http://mail.opengroupware.org/mailman/listinfo/xmlrpc