Bug 172246 - creates invalid icalendar files
Summary: creates invalid icalendar files
Status: CLOSED FIXED
Alias: None
Product: kdepimlibs
Classification: Applications
Component: kcal (show other bugs)
Version: 4.1
Platform: Debian testing Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: David Jarvie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-06 01:17 UTC by Jiri Palecek
Modified: 2010-09-02 11:02 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Bad calendar produced by kalarm (2.42 KB, application/octet-stream)
2008-10-06 01:20 UTC, Jiri Palecek
Details
A working calendar (2.42 KB, application/octet-stream)
2008-10-06 01:21 UTC, Jiri Palecek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Palecek 2008-10-06 01:17:46 UTC
Version:            (using KDE 4.1.2)
OS:                Linux
Installed from:    Debian testing/unstable Packages

When I defer a 2-week recurring event for one hour and close kalarm, the deferred alarm won't fire. I found out this is because kalarm writes incorrect kalarm files, particularly, in that case, the deferral would have

TRIGGER;VALUE=DURATION:-P1W5DT1H12M

which is an invalid value for duration (the icalendar spec says a duration using W cannot have anything else - that means -P2W is legal, -P12DT1H12M too, -P2WT1S is not).

This causes an error while this value is read from the file on the next restart, and missing the alarm. (see file icalduration.c in libical sources)

Feel free to reassign this bug to kdepimlibs, if it is appropriate.
Comment 1 Jiri Palecek 2008-10-06 01:20:01 UTC
Created attachment 27706 [details]
Bad calendar produced by kalarm

Should fire the deferral alarm anytime between ~3 Oct and 15 Oct
Comment 2 Jiri Palecek 2008-10-06 01:21:40 UTC
Created attachment 27707 [details]
A working calendar

A calendar with a corrected value. Actually fires the alarm
Comment 3 David Jarvie 2008-10-06 10:54:40 UTC
This is a bug in libkcal (icalformat_p.cpp) whereby it writes a duration value containing a weeks value mixed with a days/time value, contrary to RFC2445. When it tries to read the duration back again, libical correctly rejects this mixed value, so that the value written can't be read back again.

This has already been fixed by SVN commits 865198, 865199, 865203, 865204 to both KDE 4.1 branch and trunk. Unfortunately the fix was just too late to be included in KDE 4.1.2.