From xmlrpc@opengroupware.org Tue Apr 1 07:48:54 2008 From: xmlrpc@opengroupware.org (Tobias Kaefer) Date: Tue, 01 Apr 2008 08:48:54 +0200 Subject: [OGo-XML-RPC] Appointment, BYDAY and recurrences Message-ID: <47F1DAD6.30503@abas.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi! I came a across one problem: Let's say you want to create an appointment that starts from 8:00-17:30 for a whole workweek (MO-FR). And this appointment as an cycle (recurrence) of 4 weeks. I would create a xml-rpc string that looks like this: RRULE:FREQ=WEEKLY;INTERVAL=4;UNTIL=2009131;BYDAY=MO,TU,WE,TH,FR But that does create an appointment every Monday. Is it a bug, a feature or is there something missing/wrong in my String? Greets Tobias - -- Mit freundlichen Gruessen / with kind regards Tobias S. Käfer Tobias S. Kaefer * Portal-Development ABAS Software AG, Suedendstrasse 42, 76135 Karlsruhe, GERMANY Fon: +49 721 967 23 0, Fax: +49 721 967 23 100 Managing board / Vorstand: Werner Strub (CEO, Vorsitzender), Peter Walser Chairman supervisory board / Aufsichtsratsvorsitzender: Thomas Frank Company Register / Handelsregister: HRB 107644 Amtsgericht Mannheim please visit our homepage / Bitte besuchen Sie unsere Homepage: http://www.abas.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH8drWdJJ1JNEzpd0RAoefAJ4pipNV/yQGs7SDSusKTZLTOOZ+lACfYHKP GTT/SvHIPfGEXWwjTeIjMkE= =fFhN -----END PGP SIGNATURE----- From xmlrpc@opengroupware.org Tue Apr 1 11:13:20 2008 From: xmlrpc@opengroupware.org (Helge Hess) Date: Tue, 1 Apr 2008 12:13:20 +0200 Subject: [OGo-XML-RPC] Appointment, BYDAY and recurrences In-Reply-To: <47F1DAD6.30503@abas.de> References: <47F1DAD6.30503@abas.de> Message-ID: On 01.04.2008, at 08:48, Tobias Kaefer wrote: > I came a across one problem: > > Let's say you want to create an appointment that starts from > 8:00-17:30 > for a whole workweek (MO-FR). And this appointment as an cycle > (recurrence) of 4 weeks. > I would create a xml-rpc string that looks like this: > RRULE:FREQ=WEEKLY;INTERVAL=4;UNTIL=2009131;BYDAY=MO,TU,WE,TH,FR OGo does not support all possible iCal RRULEs (who does ...), maybe this is one of those which are unsupported. I don't know from my head what exactly is supported, if you want to dig into the ObjC source: http://svn.opengroupware.org/SOPE/trunk/sope-ical/NGiCal/ Thanks, Helge -- Helge Hess http://www.helgehess.eu/ From xmlrpc@opengroupware.org Tue Apr 1 11:23:26 2008 From: xmlrpc@opengroupware.org (Tobias Kaefer) Date: Tue, 01 Apr 2008 12:23:26 +0200 Subject: [OGo-XML-RPC] Appointment, BYDAY and recurrences In-Reply-To: References: <47F1DAD6.30503@abas.de> Message-ID: <47F20D1E.5040501@abas.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Helge Hess schrieb: | On 01.04.2008, at 08:48, Tobias Kaefer wrote: |> I came a across one problem: |> |> Let's say you want to create an appointment that starts from 8:00-17:30 |> for a whole workweek (MO-FR). And this appointment as an cycle |> (recurrence) of 4 weeks. |> I would create a xml-rpc string that looks like this: |> RRULE:FREQ=WEEKLY;INTERVAL=4;UNTIL=2009131;BYDAY=MO,TU,WE,TH,FR | | OGo does not support all possible iCal RRULEs (who does ...), maybe this | is one of those which are unsupported. I don't know from my head what | exactly is supported, if you want to dig into the ObjC source: | | http://svn.opengroupware.org/SOPE/trunk/sope-ical/NGiCal/ | | Thanks, | Helge I just looked in that sope-lib part ... I'll have to do some more research to get a clear image of what is going on there and where I can add/change some code. Greets Tobias - -- Mit freundlichen Gruessen / with kind regards Tobias S. Käfer Tobias S. Kaefer * Portal-Development ABAS Software AG, Suedendstrasse 42, 76135 Karlsruhe, GERMANY Fon: +49 721 967 23 0, Fax: +49 721 967 23 100 Managing board / Vorstand: Werner Strub (CEO, Vorsitzender), Peter Walser Chairman supervisory board / Aufsichtsratsvorsitzender: Thomas Frank Company Register / Handelsregister: HRB 107644 Amtsgericht Mannheim please visit our homepage / Bitte besuchen Sie unsere Homepage: http://www.abas.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH8g0edJJ1JNEzpd0RAqOGAJ9M2GkVGE+pjdTlkotm3kDTj477tQCcCeBR yv4F2kC6UbXnFHUmTYAaL4c= =drk8 -----END PGP SIGNATURE----- From xmlrpc@opengroupware.org Tue Apr 1 12:35:42 2008 From: xmlrpc@opengroupware.org (Tobias Kaefer) Date: Tue, 01 Apr 2008 13:35:42 +0200 Subject: [OGo-XML-RPC] Appointment, BYDAY and recurrences In-Reply-To: References: <47F1DAD6.30503@abas.de> Message-ID: <47F21E0E.7040003@abas.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Maybe I'll found the code that should be altered. But I'm not sure. So could someone please verify, that I'm at the right place: /sope-ical/NGiCal/iCalRecurrenceRule.m line 450 This is the place where the method (void)setByday:(NSString *)_byDayList { is defined. In line 489 to 492 there is an error raised that says: "we only supported one occurence" Is this the right place to start? Greets Tobias Helge Hess schrieb: | On 01.04.2008, at 08:48, Tobias Kaefer wrote: |> I came a across one problem: |> |> Let's say you want to create an appointment that starts from 8:00-17:30 |> for a whole workweek (MO-FR). And this appointment as an cycle |> (recurrence) of 4 weeks. |> I would create a xml-rpc string that looks like this: |> RRULE:FREQ=WEEKLY;INTERVAL=4;UNTIL=2009131;BYDAY=MO,TU,WE,TH,FR | | OGo does not support all possible iCal RRULEs (who does ...), maybe this | is one of those which are unsupported. I don't know from my head what | exactly is supported, if you want to dig into the ObjC source: | | http://svn.opengroupware.org/SOPE/trunk/sope-ical/NGiCal/ | | Thanks, | Helge - -- Mit freundlichen Gruessen / with kind regards Tobias S. Käfer Tobias S. Kaefer * Portal-Development ABAS Software AG, Suedendstrasse 42, 76135 Karlsruhe, GERMANY Fon: +49 721 967 23 0, Fax: +49 721 967 23 100 Managing board / Vorstand: Werner Strub (CEO, Vorsitzender), Peter Walser Chairman supervisory board / Aufsichtsratsvorsitzender: Thomas Frank Company Register / Handelsregister: HRB 107644 Amtsgericht Mannheim please visit our homepage / Bitte besuchen Sie unsere Homepage: http://www.abas.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH8h4OdJJ1JNEzpd0RAg57AJ9MzJpOYnCq8XByk7Ps9mMj9jJb0QCgxvyr C+6zKNjNi1St81uiw3+W0/s= =A8nA -----END PGP SIGNATURE----- From xmlrpc@opengroupware.org Wed Apr 2 09:52:32 2008 From: xmlrpc@opengroupware.org (Tobias Kaefer) Date: Wed, 02 Apr 2008 10:52:32 +0200 Subject: [OGo-XML-RPC] Appointment, BYDAY and recurrences In-Reply-To: <47F1DAD6.30503@abas.de> References: <47F1DAD6.30503@abas.de> Message-ID: <47F34950.2030008@abas.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I got it fixed. There was a bug in iCalWeeklyRecurrenceCalculator.m I've created a bugzilla entry at: http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1964 There is also a patch that solves this issue. Greets Tobias Tobias Kaefer: | Hi! | | I came a across one problem: | | Let's say you want to create an appointment that starts from 8:00-17:30 | for a whole workweek (MO-FR). And this appointment as an cycle | (recurrence) of 4 weeks. | I would create a xml-rpc string that looks like this: | RRULE:FREQ=WEEKLY;INTERVAL=4;UNTIL=2009131;BYDAY=MO,TU,WE,TH,FR | | But that does create an appointment every Monday. | Is it a bug, a feature or is there something missing/wrong in my String? | | Greets | Tobias | - -- Mit freundlichen Gruessen / with kind regards Tobias S. Käfer Tobias S. Kaefer * Portal-Development ABAS Software AG, Suedendstrasse 42, 76135 Karlsruhe, GERMANY Fon: +49 721 967 23 0, Fax: +49 721 967 23 100 Managing board / Vorstand: Werner Strub (CEO, Vorsitzender), Peter Walser Chairman supervisory board / Aufsichtsratsvorsitzender: Thomas Frank Company Register / Handelsregister: HRB 107644 Amtsgericht Mannheim please visit our homepage / Bitte besuchen Sie unsere Homepage: http://www.abas.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH80lQdJJ1JNEzpd0RAguvAJ4o5HT8lIBrLDWHxw2x+orHiAod6QCfZtjN 5w8aVWlgR7P4hWDIss0/K2g= =/jPs -----END PGP SIGNATURE----- From xmlrpc@opengroupware.org Wed Apr 2 09:58:05 2008 From: xmlrpc@opengroupware.org (Helge Hess) Date: Wed, 2 Apr 2008 10:58:05 +0200 Subject: [OGo-XML-RPC] Appointment, BYDAY and recurrences In-Reply-To: <47F34950.2030008@abas.de> References: <47F1DAD6.30503@abas.de> <47F34950.2030008@abas.de> Message-ID: <54CE2642-AF32-42D2-81DD-EA115991CADD@opengroupware.org> On 02.04.2008, at 10:52, Tobias Kaefer wrote: > I got it fixed. > There was a bug in iCalWeeklyRecurrenceCalculator.m > I've created a bugzilla entry at: > http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1964 > > There is also a patch that solves this issue. Adam, can you test it a bit and then commit? Thanks a lot, Helge -- Helge Hess http://www.helgehess.eu/ From xmlrpc@opengroupware.org Wed Apr 2 10:46:43 2008 From: xmlrpc@opengroupware.org (Adam Tauno Williams) Date: Wed, 02 Apr 2008 05:46:43 -0400 Subject: [OGo-XML-RPC] Appointment, BYDAY and recurrences In-Reply-To: <54CE2642-AF32-42D2-81DD-EA115991CADD@opengroupware.org> References: <47F1DAD6.30503@abas.de> <47F34950.2030008@abas.de> <54CE2642-AF32-42D2-81DD-EA115991CADD@opengroupware.org> Message-ID: <1207129603.13401.1.camel@aleph> On Wed, 2008-04-02 at 10:58 +0200, Helge Hess wrote: > On 02.04.2008, at 10:52, Tobias Kaefer wrote: > > I got it fixed. > > There was a bug in iCalWeeklyRecurrenceCalculator.m > > I've created a bugzilla entry at: > > http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1964 > > There is also a patch that solves this issue. > Adam, can you test it a bit Will do. > and then commit? I don't think I can commit to SOPE. I tried fixing the USA timezone files once (which are still wrong) and the subversion server said "no". From xmlrpc@opengroupware.org Wed Apr 2 19:55:08 2008 From: xmlrpc@opengroupware.org (Adam Tauno Williams) Date: Wed, 02 Apr 2008 14:55:08 -0400 Subject: [OGo-XML-RPC] Appointment, BYDAY and recurrences In-Reply-To: <47F20D1E.5040501@abas.de> References: <47F1DAD6.30503@abas.de> <47F20D1E.5040501@abas.de> Message-ID: <1207162508.5657.52.camel@WM_ADAM1.morrison.iserv.net> > | On 01.04.2008, at 08:48, Tobias Kaefer wrote: > |> I came a across one problem: > |> Let's say you want to create an appointment that starts from 8:00-17:30 > |> for a whole workweek (MO-FR). And this appointment as an cycle > |> (recurrence) of 4 weeks. > |> I would create a xml-rpc string that looks like this: > |> RRULE:FREQ=WEEKLY;INTERVAL=4;UNTIL=2009131;BYDAY=MO,TU,WE,TH,FR Can you post the exact xml-rpc call you are making so I can be sure to test the exact same thing? http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1964 From xmlrpc@opengroupware.org Thu Apr 3 06:18:37 2008 From: xmlrpc@opengroupware.org (Tobias Kaefer) Date: Thu, 03 Apr 2008 07:18:37 +0200 Subject: [OGo-XML-RPC] Appointment, BYDAY and recurrences In-Reply-To: <1207162508.5657.52.camel@WM_ADAM1.morrison.iserv.net> References: <47F1DAD6.30503@abas.de> <47F20D1E.5040501@abas.de> <1207162508.5657.52.camel@WM_ADAM1.morrison.iserv.net> Message-ID: <47F468AD.7050301@abas.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Let's se... This should map to what I'm doing (as plain XML): appointment.insert startDate 20080331T08:00:00 title remoteTest endDate 20080331T17:30:00 cycleEndDate 20081231T23:59:59 type RRULE:FREQ=WEEKLY;INTERVAL=4;UNTIL=20081231;BYDAY=MO,TU,WE,TH,FR Greets Tobias Adam Tauno Williams: |> | On 01.04.2008, at 08:48, Tobias Kaefer wrote: |> |> I came a across one problem: |> |> Let's say you want to create an appointment that starts from 8:00-17:30 |> |> for a whole workweek (MO-FR). And this appointment as an cycle |> |> (recurrence) of 4 weeks. |> |> I would create a xml-rpc string that looks like this: |> |> RRULE:FREQ=WEEKLY;INTERVAL=4;UNTIL=2009131;BYDAY=MO,TU,WE,TH,FR | | Can you post the exact xml-rpc call you are making so I can be sure to | test the exact same thing? | | http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1964 | - -- Mit freundlichen Gruessen / with kind regards Tobias S. Käfer Tobias S. Kaefer * Portal-Development ABAS Software AG, Suedendstrasse 42, 76135 Karlsruhe, GERMANY Fon: +49 721 967 23 0, Fax: +49 721 967 23 100 Managing board / Vorstand: Werner Strub (CEO, Vorsitzender), Peter Walser Chairman supervisory board / Aufsichtsratsvorsitzender: Thomas Frank Company Register / Handelsregister: HRB 107644 Amtsgericht Mannheim please visit our homepage / Bitte besuchen Sie unsere Homepage: http://www.abas.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH9GitdJJ1JNEzpd0RAnC3AJoD7GGEux4DuFtOU/+PoiCKK+0yoACfdmdH w9XLYGdGMQLfdY74BPTAsCY= =CHHz -----END PGP SIGNATURE----- From xmlrpc@opengroupware.org Thu Apr 24 06:33:42 2008 From: xmlrpc@opengroupware.org (Tobias Kaefer) Date: Thu, 24 Apr 2008 07:33:42 +0200 Subject: [OGo-XML-RPC] zOGI and timeZone Message-ID: <48101BB6.7020706@abas.de> Hi, 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] Greets Tobias -- Mit freundlichen Gruessen / with kind regards Tobias S. Käfer Tobias S. Kaefer * Portal-Development ABAS Software AG, Suedendstrasse 42, 76135 Karlsruhe, GERMANY Fon: +49 721 967 23 0, Fax: +49 721 967 23 100 Managing board / Vorstand: Werner Strub (CEO, Vorsitzender), Peter Walser Chairman supervisory board / Aufsichtsratsvorsitzender: Thomas Frank Company Register / Handelsregister: HRB 107644 Amtsgericht Mannheim please visit our homepage / Bitte besuchen Sie unsere Homepage: http://www.abas.de From xmlrpc@opengroupware.org Thu Apr 24 08:43:07 2008 From: xmlrpc@opengroupware.org (Helge Hess) Date: Thu, 24 Apr 2008 09:43:07 +0200 Subject: [OGo-XML-RPC] zOGI and timeZone In-Reply-To: <48101BB6.7020706@abas.de> References: <48101BB6.7020706@abas.de> Message-ID: On 24.04.2008, at 07:33, Tobias Kaefer wrote: > Wouldn't it be better to do it in a way like this: (??) > [dateValue setTimeZone:timeZone] Yes. NSDate values are always UTC, if you need to apply timezone offsets set the proper NSTimeZone object on the date. Greets, Helge -- Helge Hess http://www.helgehess.eu/ From xmlrpc@opengroupware.org Thu Apr 24 13:49:39 2008 From: xmlrpc@opengroupware.org (Adam Tauno Williams) Date: Thu, 24 Apr 2008 08:49:39 -0400 Subject: [OGo-XML-RPC] zOGI and timeZone In-Reply-To: <48101BB6.7020706@abas.de> References: <48101BB6.7020706@abas.de> Message-ID: <1209041379.5737.6.camel@WM_ADAM1.morrison.iserv.net> > 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. From xmlrpc@opengroupware.org Thu Apr 24 14:11:47 2008 From: xmlrpc@opengroupware.org (Tobias Kaefer) Date: Thu, 24 Apr 2008 15:11:47 +0200 Subject: [OGo-XML-RPC] zOGI and timeZone In-Reply-To: <1209041379.5737.6.camel@WM_ADAM1.morrison.iserv.net> References: <48101BB6.7020706@abas.de> <1209041379.5737.6.camel@WM_ADAM1.morrison.iserv.net> Message-ID: <48108713.6090406@abas.de> Adam Tauno Williams: >> 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. Greets Tobias -- Mit freundlichen Gruessen / with kind regards Tobias S. Käfer Tobias S. Kaefer * Portal-Development ABAS Software AG, Suedendstrasse 42, 76135 Karlsruhe, GERMANY Fon: +49 721 967 23 0, Fax: +49 721 967 23 100 Managing board / Vorstand: Werner Strub (CEO, Vorsitzender), Peter Walser Chairman supervisory board / Aufsichtsratsvorsitzender: Thomas Frank Company Register / Handelsregister: HRB 107644 Amtsgericht Mannheim please visit our homepage / Bitte besuchen Sie unsere Homepage: http://www.abas.de From xmlrpc@opengroupware.org Thu Apr 24 14:41:27 2008 From: xmlrpc@opengroupware.org (Adam Tauno Williams) Date: Thu, 24 Apr 2008 09:41:27 -0400 Subject: [OGo-XML-RPC] zOGI and timeZone In-Reply-To: <48108713.6090406@abas.de> References: <48101BB6.7020706@abas.de> <1209041379.5737.6.camel@WM_ADAM1.morrison.iserv.net> <48108713.6090406@abas.de> Message-ID: <1209044487.5737.20.camel@WM_ADAM1.morrison.iserv.net> > >> 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. From xmlrpc@opengroupware.org Fri Apr 25 05:34:24 2008 From: xmlrpc@opengroupware.org (Tobias Kaefer) Date: Fri, 25 Apr 2008 06:34:24 +0200 Subject: [OGo-XML-RPC] zOGI and timeZone In-Reply-To: <1209044487.5737.20.camel@WM_ADAM1.morrison.iserv.net> References: <48101BB6.7020706@abas.de> <1209041379.5737.6.camel@WM_ADAM1.morrison.iserv.net> <48108713.6090406@abas.de> <1209044487.5737.20.camel@WM_ADAM1.morrison.iserv.net> Message-ID: <48115F50.9080606@abas.de> Sorry, but I have one point, that I forgot (I wrote the last mail in a little bit of a hurry): In zOGIAction.m (trunk in svn rev. 968) line 458, there is the timeZone set by: [dateValue setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"GMT"]]; So this should be the place where the timeZone is set. I recognized just this morning, that I commented this line out for debugging. Once again sorry. Greets Tobias Adam Tauno Williams schrieb: >>>> 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. > -- Mit freundlichen Gruessen / with kind regards Tobias S. Käfer Tobias S. Kaefer * Portal-Development ABAS Software AG, Suedendstrasse 42, 76135 Karlsruhe, GERMANY Fon: +49 721 967 23 0, Fax: +49 721 967 23 100 Managing board / Vorstand: Werner Strub (CEO, Vorsitzender), Peter Walser Chairman supervisory board / Aufsichtsratsvorsitzender: Thomas Frank Company Register / Handelsregister: HRB 107644 Amtsgericht Mannheim please visit our homepage / Bitte besuchen Sie unsere Homepage: http://www.abas.de From xmlrpc@opengroupware.org Fri Apr 25 16:29:37 2008 From: xmlrpc@opengroupware.org (Adam Tauno Williams) Date: Fri, 25 Apr 2008 11:29:37 -0400 Subject: [OGo-XML-RPC] zOGI and timeZone In-Reply-To: <48115F50.9080606@abas.de> References: <48101BB6.7020706@abas.de> <1209041379.5737.6.camel@WM_ADAM1.morrison.iserv.net> <48108713.6090406@abas.de> <1209044487.5737.20.camel@WM_ADAM1.morrison.iserv.net> <48115F50.9080606@abas.de> Message-ID: <1209137377.4801.39.camel@aleph> > Sorry, but I have one point, that I forgot (I wrote the last mail in a > little bit of a hurry): > In zOGIAction.m (trunk in svn rev. 968) line 458, there is the timeZone > set by: > [dateValue setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"GMT"]]; > So this should be the place where the timeZone is set. > I recognized just this morning, that I commented this line out for > debugging. Once again sorry. Okay. :) The whole - dateValue = [dateValue dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:(zoneDiff * -1)]; - should only kick in if the user sent the appointment with a "timeZone" key, otherwise the value is assumed to be GMT. This is only to allow the user to send something like - app['start'] = '2007-02-18 13:00' app['end'] = '2007-02-18 15:00' app['timeZone'] = 'EST' - and let the server do the conversion to GMT. Handy since having to deal with timezones makes scripts, etc... and order of magnitude more complicated. The values stored and those returned to the application should *always* be GMT. If you don't send a "timeZone" key no adjustment is made and it should be stored as-is as GMT. If that isn't happening please let me know. The other cheat supported for timezones is that the server will return the timezone the user has defined as their default as well as what it thinks the offset is from GMT for the start and end time. This way making little widgets or web parts that can display calendar data in the user's timezone is trivial. These are returned in the appointment like - 'end': , 'endOffset': -18000, 'offsetTimeZone': 'EDT', 'start': , 'startOffset': -18000, - so all the data to display the event correctly is included in the response. It should work even if the start and end spans a daylight savings transition. Just add the provided offset to the appropriate time value and you should achieve the value for the offsetTimeZone. Timezones, and their abbreviations, can be retrieved form the server as described at Retrieving and setting a user's defaults, which contains the time zone, is described at . These should be the same defaults as used by the WebUI. -- Consonance: an Open Source .NET OpenGroupware client. Contact:awilliam@whitemiceconsulting.com http://freshmeat.net/projects/consonance/