#
# PUT an iCal style event with repeats and alarms
#
TYPE=PUT
URL=http://regression.host/caldav.php/resource2/home/3C1BF85D-3F28-413F-844F-80EBD33B8EE6.ics
HEADER=Content-Type: text/calendar
HEADER=User-Agent: DAVKit/2.0 (10.5.1; wrbt) iCal 3.0.1
HEAD


BEGINDATA
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Apple Inc.//iCal 3.0//EN
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:Pacific/Auckland
BEGIN:STANDARD
TZOFFSETFROM:+1300
TZOFFSETTO:+1200
DTSTART:19900318T030000
RRULE:FREQ=YEARLY;UNTIL=20070317T140000Z;BYMONTH=3;BYDAY=3SU
TZNAME:NZST
END:STANDARD
BEGIN:DAYLIGHT
TZOFFSETFROM:+1200
TZOFFSETTO:+1300
DTSTART:20070930T020000
RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=-1SU
TZNAME:NZDT
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+1300
TZOFFSETTO:+1200
DTSTART:20080406T030000
RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
TZNAME:NZST
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
SEQUENCE:7
DESCRIPTION:Lunch will be needed
UID:3C1BF85D-3F28-413F-844F-80EBD33B8EE6
TRANSP:OPAQUE
DTSTART;TZID=Pacific/Auckland:20071123T120000
DTSTAMP:20071124T221900Z
SUMMARY:Beard Meeting
CREATED:20071124T221521Z
DTEND;TZID=Pacific/Auckland:20071123T140000
RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=4FR
BEGIN:VALARM
X-WR-ALARMUID:F5B2B4CF-E7F2-47B3-8243-8CB829E81122
ACTION:EMAIL
DESCRIPTION:This is an event reminder
SUMMARY:Alarm notification
ATTENDEE:mailto:andrew@mcmillan.net.nz
TRIGGER:-P8D
END:VALARM
BEGIN:VALARM
X-WR-ALARMUID:3A336F1D-550D-412F-9BDE-EBE8B03E8A53
ACTION:AUDIO
TRIGGER:-PT15M
ATTACH;VALUE=URI:Basso
END:VALARM
END:VEVENT
END:VCALENDAR
ENDDATA


QUERY
SELECT caldav_data.user_no, caldav_data.dav_etag, caldav_type, logged_user, 
       uid, dtstamp, dtstart at time zone olson_name as dtstart, dtend at time zone olson_name as dtend,
       due, summary, location, description, priority, class, transp, rrule, url,
       percent_complete, tz_id, status,
       caldav_data AS " CalDAV Data", calendar_item.last_modified
FROM caldav_data JOIN calendar_item USING(dav_name) LEFT JOIN timezones ON (tz_id=tzid)
WHERE caldav_data.dav_name =
'/resource2/home/3C1BF85D-3F28-413F-844F-80EBD33B8EE6.ics';
ENDQUERY

