Question

I use ical and darwin in my web site. when i create a event with rrule, it failed when the event has byday and count. Forexample: success 1(weekly and no count):

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//ZHAOXI//iCalendar 1.0.0//
BEGIN:VEVENT
UID:20130410T020715CST-05076UU95w@ZHAOXI
DTSTAMP:20130409T180715Z
CLASS:PUBLIC
DTSTART:20130411T110000
DTEND:20130411T150000
ORGANIZER;SCHEDULE-AGENT=NONE;SCHEDULE-STATUS=5.3:MAILTO:user_3@zhaoxi.me
RRULE:FREQ=WEEKLY;BYDAY=TH,SA
SEQUENCE:0
SUMMARY:ssssss
X-ZX-RESPONSE:Y
END:VEVENT
BEGIN:VEVENT
UID:20130410T020715CST-05076UU95w@ZHAOXI
DTSTAMP:20130409T180718Z
CLASS:PUBLIC
DTSTART:20130413T130000
DTEND:20130413T170000
ORGANIZER:MAILTO:user_3@zhaoxi.me
RECURRENCE-ID:20130413T110000
SEQUENCE:1
SUMMARY:ssssss
X-ZX-RESPONSE:Y
END:VEVENT
END:VCALENDAR

success 2 (daily with count):

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//ZHAOXI//iCalendar 1.0.0//
BEGIN:VEVENT
UID:20130410T021754CST-68882mJ5aU@ZHAOXI
DTSTAMP:20130409T181754Z
CLASS:PUBLIC
DTSTART:20130416T173000
DTEND:20130416T200000
ORGANIZER;SCHEDULE-AGENT=NONE;SCHEDULE-STATUS=5.3:MAILTO:user_3@zhaoxi.me
RRULE:FREQ=DAILY;COUNT=10
SEQUENCE:0
SUMMARY:sdf
X-ZX-RESPONSE:Y
END:VEVENT
BEGIN:VEVENT
UID:20130410T021754CST-68882mJ5aU@ZHAOXI
DTSTAMP:20130409T181805Z
CLASS:PUBLIC
DTSTART:20130417T190000
DTEND:20130417T213000
ORGANIZER:MAILTO:user_3@zhaoxi.me
RECURRENCE-ID:20130417T173000
SEQUENCE:1
SUMMARY:sdf
X-ZX-RESPONSE:Y
END:VEVENT
BEGIN:VEVENT
UID:20130410T021754CST-68882mJ5aU@ZHAOXI
DTSTAMP:20130409T181850Z
CLASS:PUBLIC
DTSTART:20130419T183000
DTEND:20130419T210000
ORGANIZER:MAILTO:user_3@zhaoxi.me
RECURRENCE-ID:20130419T173000
SEQUENCE:1
SUMMARY:sdf
X-ZX-RESPONSE:Y
END:VEVENT
END:VCALENDAR

failed 1:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//ZHAOXI//iCalendar 1.0.0//
BEGIN:VEVENT
UID:20130410T015311CST-3605lc7xEv@ZHAOXI
DTSTAMP:20130409T175311Z
CLASS:PUBLIC
DTSTART:20130411T050000
DTEND:20130411T083000
ORGANIZER;SCHEDULE-AGENT=NONE;SCHEDULE-STATUS=5.3:MAILTO:user_3@zhaoxi.me
RRULE:FREQ=WEEKLY;UNTIL=20130420T050000Z;BYDAY=TH,SA
SEQUENCE:0
SUMMARY:dddddddd
X-ZX-RESPONSE:Y
END:VEVENT
BEGIN:VEVENT
UID:20130410T015311CST-3605lc7xEv@ZHAOXI
DTSTAMP:20130409T180755Z
CLASS:PUBLIC
DTSTART:20130413T070000
DTEND:20130413T103000
ORGANIZER:MAILTO:user_3@zhaoxi.me
RECURRENCE-ID:20130413T053000
SEQUENCE:1
SUMMARY:dddddddd
X-ZX-RESPONSE:Y
END:VEVENT
END:VCALENDAR

I think the difference is the rrule, but i could not find the reason~

Was it helpful?

Solution

Your master component has

DTSTART:20130411T050000

but your exception has

RECURRENCE-ID:20130413T053000

The recurrence id should always match one of (expanded) instances of the event. The date part is correct (20130413 is the saturday following the first instance) but the time part is 053000 when the first instance shows a time part of 050000.

In other words, your recurrence-id should be:

RECURRENCE-ID:20130413T050000

OTHER TIPS

there is nothing wrong in your rrule, but however RFC5545 §3.8.4.7 specifies "UID" itself MUST be a globally unique identifier and in all 3 of your icalendar files you are using the same UID. Have you tried with each event having a different UID to see how the server handles it?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top