On Di, 2010-12-14 at 14:57 +0000, Lukas Zeller wrote: > Hello Patrick, > > On Dec 14, 2010, at 12:59 , Patrick Ohly wrote: > > >> The until date/time should IMHO be handled exactly like dates with the > >> CONVMODE_AUTOENDDATE conversion mode, which renders date-only values > >> as floating date+time in mimo_old (vCalendar xxx), but as date-only > >> values in MIME-DIR (iCalendar 2.0). > > > > You are not suggesting to use convmode="auto[end]date" as it is, right? > > No, just similar in concept. Such that you can think more or less in > iCalendar 2.0 (UNTIL can be date-only or date-time, depending whether > the master is an all-day or an appointment),
FWIW, the event in this case was not an all-day event, but Evolution nevertheless used a date-only until value. > > If I read the documentation right, it will turn 20101231 into either > > 20101231T235959 (<autoenddateinclusive>) or 20101231T000000. > > 20101230T235959, not 31st (typo assumed :-) Yes. > > In both cases it would cut off the last occurrence on day 20101231. > > Yes, that can't be applied 1:1 to UNTIL. I'd suggest that for an > all-day the vCalendar 1.0 representation would be 23:59:59 on that day > (and not on the day before as for DTEND). With this, the last > occurrence will be included for certain. Agreed. Seems that I was trying to hard when a simpler solution would have worked just as well ;-) > >> My suggestion (I'll propose a patch soon) would be to make RR_END > >> behave like CONVMODE_AUTOENDDATE to handle the case of an input > >> timestamp which is a date-only. > > > > Okay. Let me know when it is ready and I'll redo my tests. > > > My suggestion (not tested yet) would be: > > From 08858608eeb252eef84b340ccc76f0b4f890a19d Mon Sep 17 00:00:00 2001 > From: Lukas Zeller <l...@synthesis.ch> > Date: Tue, 14 Dec 2010 15:53:28 +0100 > Subject: [PATCH] engine: prevent generating invalid recurrence end > specifications in vCalendar 1.0 RRULE (date-only not allowed, must be > date+time) Almost works, except that the added time is truncated because the "untilcontext" still says "date-only" for the conversion. I've added one line (patch below) and commit an amended commit to the meego.gitorious.org repo. diff --git a/src/sysync/mimedirprofile.cpp b/src/sysync/mimedirprofile.cpp index 6eb9790..27fcacb 100644 --- a/src/sysync/mimedirprofile.cpp +++ b/src/sysync/mimedirprofile.cpp @@ -1720,6 +1720,7 @@ bool TMimeDirProfileHandler::fieldToMIMEString( if (TCTX_IS_DATEONLY(untilcontext) && fMimeDirMode==mimo_old) { // there are no date-only recurrence ends in vCalendar 1.0 until = lineartime2dateonlyTime(until)+secondToLinearTimeFactor*SecsPerHour*24-1 ; // make time part 23:5: + untilcontext &= ~TCTX_DATEONLY; } } // Now do the conversion -- 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 os-libsynthesis@synthesis.ch http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis