On Wed, 2009-07-29 at 15:10 +0100, Patrick Ohly wrote:
> On Tue, 2009-07-28 at 21:37 +0100, Patrick Ohly wrote:
[old revision of EXDATE conversion]
> > Does that look right?

Hah, no-one dared to say anything! You missed your chance to spot a
weakness in the code above, caught by the SyncEvolution
ical20::testItems test: EXDATEs for all-day events are dates, not times,
so converting them does not make sense.

Here's the updated code. I'm still interested in comments, although I'll
go ahead and give it a try in the nightly testing:

        // Make sure that all EXDATE times are in the same timezone as the start
        // time. Some servers send them as UTC, which is all fine and well, but
        // only if the timezone definition doesn't change. Also, libical does 
not
        // handle such UTC EXDATEs, so let's convert it while the UTC and
        // time zone definition (hopefully) are in sync.
        if (TIMEZONE(DTSTART) != "UTZ" && !ISFLOATING(DTSTART)) {
          i = 0;
          timestamp exdate;
          while (i<SIZE(EXDATES)) {
            exdate = EXDATES[i];
            if (!ISDATEONLY(exdate) &&
                (TIMEZONE(exdate) == "UTC" || ISFLOATING(exdate))) {
              // "unfloat" floating time stamps: not sure whether that occcurs
              // in practice, but it looks as wrong as UTC EXDATEs
              EXDATES[i] = CONVERTTOZONE(exdate,DTSTART,TRUE);
            }
            i=i+1;
          }
        }

-- 
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

Reply via email to