On Mon, 2010-04-26 at 13:40 +0100, Patrick Ohly wrote:
> On Wed, 2010-04-21 at 09:39 +0200, Patrick Ohly wrote:
> > I have a meeting in my Evolution calendar which I synchronize with
> > SyncEvolution. I noticed that the outgoing VEVENT has start and end
> > time
> > converted to UTC times which are one hour off.
> >
> > Here's the stripped down event:
> >
> > BEGIN:VCALENDAR
> > PRODID:-//Ximian//NONSGML Evolution Calendar//EN
> > VERSION:2.0
> > METHOD:PUBLISH
> > BEGIN:VTIMEZONE
> > TZID:GMT Standard Time
> > BEGIN:STANDARD
> > DTSTART:16010101T020000
> > TZOFFSETFROM:+0100
> > TZOFFSETTO:+0000
> > RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
> > END:STANDARD
> > BEGIN:DAYLIGHT
> > DTSTART:16010101T010000
> > TZOFFSETFROM:+0000
> > TZOFFSETTO:+0100
> > RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
> > END:DAYLIGHT
> > END:VTIMEZONE
> > BEGIN:VEVENT
> > SUMMARY:test event
> > DTSTART;TZID=GMT Standard Time:20100421T150000
> > DTEND;TZID=GMT Standard Time:20100421T160000
> > UID:040000008200E00074C5B7101A82E0080000000000B5A586D0A4CA01000000000000000010
> > CLASS:PUBLIC
> > PRIORITY:5
> > DTSTAMP:20100415T035521Z
> > TRANSP:OPAQUE
> > STATUS:CONFIRMED
> > SEQUENCE:4
> > END:VEVENT
> > END:VCALENDAR
>
> This fails because RRULE2toInternal() in rrule.cpp fails to convert the
> RRULE properties into the internal format. It bombs out here:
>
> switch (freq)
> {
> ...
> case 'Y' :
> if (byday == "" ||
> (byday.length() == 2 && byday[0] ==
> RRULE_weekdays[startwday][0] &&
> byday[1] ==
> RRULE_weekdays[startwday][1]))
> {
> ...
> }
> else
> {
> goto incompat;
> }
>
> It reaches the "goto incompat" because byday == "-1SU".
>
> Recurrence rules with "last day in month ..." are common for VTIMEZONEs.
> Beat, is that really something that is not handled by the Synthesis code
> at the moment? What would be necessary to add support for it?
I'm still wondering about this.
In the meantime I looked into VTIMEZONEs which parse successfully. What
I found is that FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 (as in the example
above) is supported, by converting it to the equivalent
FREQ=MONTHLY;INTERVAL=12;BYDAY=-1SU.
However, there is a sanity check that compares the start month:
if (DayMonthCombi( freq, byday,bymonth,startmonth )) {
freq = 'M'; // a different model will be chosen for this case,
interval= 12*interval; // which is in fact aequivalent
bymonth = "";
} // if
In the example above, DTSTART=16010101T020000 and thus startmonth !=
bymonth. DayMonthCombi() then returns false.
Does the month in DTSTART really matter in this case? I would expect
that the first recurrence will be in the month specified in BYMONTH
which is >= than the month in DTSTART, so one could apply the conversion
to FREQ=MONTHLY;INTERVAL=12;BYDAY=-1SU by setting the month in DTSTART
to the value from BYMONTH.
Does that make sense?
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
_______________________________________________
os-libsynthesis mailing list
[email protected]
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis