#
# Overwrite iCal event with another one
#
TYPE=PUT
URL=http://regression.host/caldav.php/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/6C8A0D88-E1F9-4FC1-9EDD-DA258ABF2CFA.ics
HEADER=Content-Type: text/calendar
HEADER=User-Agent: DAVKit/2.0 (10.5.1; wrbt) iCal 3.0.1
HEADER=If-Match: "b7cfb403232dc83f936c15a179901d50"
HEAD


#
# This event is a repeat Mo,Tu,We,Th,Fr forever
#
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:5
TRANSP:OPAQUE
UID:6C8A0D88-E1F9-4FC1-9EDD-DA258ABF2CFA
DTSTART;TZID=Pacific/Auckland:20071126T070000
DTSTAMP:20071124T084239Z
SUMMARY:Go to work
CREATED:20071124T083709Z
DTEND;TZID=Pacific/Auckland:20071126T170000
RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR;WKST=SU
BEGIN:VALARM
X-WR-ALARMUID:F33877C6-563B-4F20-B129-77A5B6C6944E
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) JOIN timezones ON (tz_id=tzid)
WHERE caldav_data.dav_name =
 '/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/6C8A0D88-E1F9-4FC1-9EDD-DA258ABF2CFA.ics';
ENDQUERY

