diff --git a/testing/run_regressions.sh b/testing/run_regressions.sh
index 53af7251..c046c722 100755
--- a/testing/run_regressions.sh
+++ b/testing/run_regressions.sh
@@ -45,7 +45,6 @@ fi
SUITE=${1:-"regression-suite"}
ACCEPT_ALL=${2:-""}
-[ -z "${UNTIL}" ] && UNTIL=99999
[ -z "${SUITE}" ] && SUITE="regression-suite"
# psql ${PSQLOPTS} -l
@@ -250,9 +249,6 @@ run_regression_suite() {
TEST="`basename ${T} .test`"
TESTNUM="`echo ${TEST} | cut -f1 -d'-'`"
TESTNUM="${TEST/-*}"
- if [ "${TESTNUM}" -gt "${UNTIL}" ] ; then
- break;
- fi
RESULT=999
while [ "${RESULT}" -gt 0 ]; do
diff --git a/testing/tests/regression-suite/2701-Future-Event.ics b/testing/tests/regression-suite/2701-Future-Event.ics
deleted file mode 100644
index 346a351f..00000000
--- a/testing/tests/regression-suite/2701-Future-Event.ics
+++ /dev/null
@@ -1,13 +0,0 @@
-BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
-BEGIN:VEVENT
-CLASS:PUBLIC
-DTSTAMP:20240120T034700Z
-DTSTART;VALUE=DATE:21110917
-DTEND;VALUE=DATE:21110918
-SUMMARY:Test date in the far future
-TRANSP:TRANSPARENT
-UID:2701-Future-Event
-END:VEVENT
-END:VCALENDAR
diff --git a/testing/tests/regression-suite/2701-Future-Event.result b/testing/tests/regression-suite/2701-Future-Event.result
deleted file mode 100644
index 01686625..00000000
--- a/testing/tests/regression-suite/2701-Future-Event.result
+++ /dev/null
@@ -1,8 +0,0 @@
-HTTP/1.1 201 Created
-Date: Dow, 01 Jan 2000 00:00:00 GMT
-DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
-DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
-ETag: "576d29bf0ae5b8d45adac8c037254d73"
-Content-Length: 0
-Content-Type: text/plain; charset="utf-8"
-
diff --git a/testing/tests/regression-suite/2701-Future-Event.test b/testing/tests/regression-suite/2701-Future-Event.test
deleted file mode 100644
index 5ab6d1d3..00000000
--- a/testing/tests/regression-suite/2701-Future-Event.test
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# PUT an event that is far in the future.
-# Note, in 2111-09-17 we'll need to update this test. Might be up to my
-# great grandkids.
-#
-TYPE=PUT
-URL=http://regression.host/caldav.php/user1/home/2701-Future-Event.ics
-HEADER=User-Agent: CalDavSynchronizer/4.4
-HEADER=Content-Type: text/calendar; charset=utf-8
-HEAD
-#
-DATA=2701-Future-Event.ics
diff --git a/testing/tests/regression-suite/2702-Past-Event.result b/testing/tests/regression-suite/2701-Lots-of-dates.result
similarity index 56%
rename from testing/tests/regression-suite/2702-Past-Event.result
rename to testing/tests/regression-suite/2701-Lots-of-dates.result
index 7373276d..69cce0c6 100644
--- a/testing/tests/regression-suite/2702-Past-Event.result
+++ b/testing/tests/regression-suite/2701-Lots-of-dates.result
@@ -2,7 +2,15 @@ HTTP/1.1 201 Created
Date: Dow, 01 Jan 2000 00:00:00 GMT
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
-ETag: "36fb08aef42b676c00a2926f1a40f820"
+Cache-Control: no-cache
Content-Length: 0
Content-Type: text/plain; charset="utf-8"
+
+ dav_displayname: >Past and Future dates<
+ is_addressbook: >0<
+ is_calendar: >1<
+ parent_container: >/user1/<
+public_events_onl: >0<
+ user_no: >10<
+
diff --git a/testing/tests/regression-suite/2701-Lots-of-dates.test b/testing/tests/regression-suite/2701-Lots-of-dates.test
new file mode 100644
index 00000000..9df1c977
--- /dev/null
+++ b/testing/tests/regression-suite/2701-Lots-of-dates.test
@@ -0,0 +1,33 @@
+# Ensure we test various dates past and future.
+
+SCRIPT_DIR=tests/regression-suite
+SCRIPT=./2701-generate-date-tests.pl
+
+TYPE=MKCOL
+URL=http://regression.host/caldav.php/user1/past-and-future
+HEADER=Content-Type: text/xml
+HEAD
+
+BEGINDATA
+
+
+
+
+
+
+
+
+ Past and Future dates
+
+
+
+ENDDATA
+
+
+QUERY
+SELECT user_no, parent_container, dav_displayname,
+ is_calendar, public_events_only, is_addressbook
+FROM collection
+WHERE dav_name ~ '/user1/past-and-future';
+ENDQUERY
+
diff --git a/testing/tests/regression-suite/2701-generate-date-tests.pl b/testing/tests/regression-suite/2701-generate-date-tests.pl
new file mode 100755
index 00000000..f09e39cc
--- /dev/null
+++ b/testing/tests/regression-suite/2701-generate-date-tests.pl
@@ -0,0 +1,312 @@
+#!/usr/bin/perl -w
+
+# Generate test files for a selection of different dates, in an easily
+# extendable and reproducible manner.
+#
+# When adding result blocks, in vi to append carriage return (aka ^M) use:
+# ^v^m
+#
+# Make all the dates UTC when we create them, otherwise we need to deal with
+# the timezone changes in the past. NZ used to be +11:39:04?!
+
+use strict;
+use v5.10;
+use Template;
+use Inline::Files;
+
+die "Run in the same directory as the script"
+ unless -f '2701-generate-date-tests.pl';
+
+# PostgreSQL allows 4713 BC - 294276 AD for timestamps.
+# https://www.postgresql.org/docs/16/datatype-datetime.html
+# To create dates prior to 1 AD in PostgreSQL you need to use 1000-01-01 BC,
+# not ISO 8601 style which is -1001-01-01 (-1001 because 0 = -1 BC). We also
+# need to allow a minus on all ISO date regexes.
+#
+# Currently DAViCal only support years < 10,000 due to various regexes that
+# assume a maximum for 4 digits for the year. Due to some logic that attends
+# 720 # days to a year for filtering, the maximum year we realistically
+# support is 9997.
+
+my @dates = qw/
+ 00010102 08040229 50000701 18500820 19010101 20000101 30000101 99970820
+ /;
+
+my $collection = 'past-and-future';
+my $user = 'user1';
+
+my @files = (
+ {
+ name => '[% num %]a-PUT-Event.test',
+ handle => 'PUT',
+ },
+ {
+ name => '[% num %]a-PUT-Event.result',
+ handle => 'PUT_RESULT',
+ },
+ {
+ name => '[% num %]b-REPORT-Event.test',
+ handle => 'REPORT',
+ },
+ {
+ name => '[% num %]b-REPORT-Event.result',
+ handle => 'REPORT_RESULT',
+ },
+ {
+ name => '[% num %]c-FREEBUSY-Event.test',
+ handle => 'FREEBUSY',
+ },
+ {
+ name => '[% num %]c-FREEBUSY-Event.result',
+ handle => 'FREEBUSY_RESULT',
+ },
+);
+
+my $start_number = 2702;
+
+my $tt = new Template;
+
+# Load all the templates into a hash.
+for my $file (@files) {
+ local $/ = undef;
+
+ my $handle = $file->{handle};
+ $file->{template} = <$handle>;
+}
+
+for my $date (sort @dates) {
+ my $vars = {
+ user => $user,
+ date => $date,
+ num => $start_number++,
+ duration => 'P1H',
+ collection => $collection,
+ };
+
+ if ($date =~ /^-?(\d{4}\d{2}\d{2})$/) {
+ # Just a date
+ $vars->{'caldav_date'} = ":${date}T000000Z";
+ $vars->{'timestamp'} = "${date}T000000Z";
+ $vars->{'range_end'} = "${date}T020000Z";
+ } else {
+ # Timestamp
+ $vars->{'caldav_date'} = ":${date}";
+ $vars->{'timestamp'} = $date;
+ }
+
+ for my $file (@files) {
+ # Template the filename to write to.
+ my $filename;
+ $tt->process(\$file->{name}, $vars, \$filename)
+ || die $tt->error(), "\n";
+
+ # Actually write to the file.
+ $tt->process(\$file->{template}, $vars, $filename)
+ || die $tt->error(), "\n";
+ }
+}
+
+__PUT__
+#
+# PUT an event in [% date %]
+#
+TYPE=PUT
+URL=http://regression.host/caldav.php/[% user %]/[% collection %]/[% num %]-PUT-Event-[% date %].ics
+AUTH=[% user %]:[% user %]
+HEADER=User-Agent: test-suite/1.0
+HEADER=Content-Type: text/calendar; charset=utf-8
+HEAD
+#
+
+REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
+
+BEGINDATA
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:20240120T034700Z
+DTSTART[% caldav_date %]
+DURATION:[% duration %]
+SUMMARY:Test date in [% date %]
+TRANSP:OPAQUE
+UID:[% num %]-PUT-Event-[% date %]
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+ENDDATA
+
+QUERY
+SELECT caldav_data.user_no, 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,
+ calendar_item.last_modified,
+ caldav_data AS "A1 CalDAV DATA"
+FROM caldav_data JOIN calendar_item USING(dav_name) LEFT JOIN timezones ON (tz_id=tzid)
+WHERE caldav_data.dav_name ~ '^/[% user %]/[% collection %]/'
+ AND uid = '[% num %]-PUT-Event-[% date %]'
+ENDQUERY
+
+
+__PUT_RESULT__
+HTTP/1.1 201 Created
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "a fine looking etag"
+Content-Length: 0
+Content-Type: text/plain; charset="utf-8"
+
+
+ A1 CalDAV DATA: >BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:20240120T034700Z
+DTSTART[% caldav_date %]
+DURATION:[% duration %]
+SUMMARY:Test date in [% date %]
+TRANSP:OPAQUE
+UID:[% num %]-PUT-Event-[% date %]
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+<
+ caldav_type: >VEVENT<
+ class: >PUBLIC<
+ description: >NULL<
+ dtend: >NULL<
+ dtstamp: >2024-01-20 03:47:00<
+ dtstart: >NULL<
+ due: >NULL<
+ last_modified: >2024-01-20 03:47:00<
+ location: >NULL<
+ logged_user: >10<
+ percent_complete: >NULL<
+ priority: >NULL<
+ rrule: >FREQ=WEEKLY;COUNT=2<
+ status: >NULL<
+ summary: >Test date in [% date %]<
+ transp: >OPAQUE<
+ tz_id: >NULL<
+ uid: >[% num %]-PUT-Event-[% date %]<
+ url: >NULL<
+ user_no: >10<
+
+__REPORT__
+#
+# REPORT on event for [% date %], created by previous test.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/[% user %]/[% collection %]/
+AUTH=[% user %]:[% user %]
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
+REPLACE=/^DTSTAMP:\d+T\d+Z/DTSTAMP:xx/
+REPLACE=/^Content-Length: \d+/Content-Length: xx/
+
+BEGINDATA
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENDDATA
+
+__REPORT_RESULT__
+HTTP/1.1 207 Multi-Status
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "a fine looking etag"
+Content-Length: xx
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+ /caldav.php/[% user %]/[% collection %]/[% num %]-PUT-Event-[% date %].ics
+
+
+ BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:xx
+DTSTART:[% timestamp %]
+DURATION:P1H
+SUMMARY:Test date in [% date %]
+TRANSP:OPAQUE
+UID:[% num %]-PUT-Event-[% date %]
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
+__FREEBUSY__
+#
+# Free/Busy should show two busy periods one that starts at the timestamp
+# and another a week later. I haven't added logic to the script which
+# generates this file to work out what those other dates are, so as long
+# as we have two busy periods, we'll call that done.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/[% user %]/[% collection %]/
+AUTH=[% user %]:[% user %]
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+REPLACE=/^Content-Length: [0-9]+/Content-Length: xx/
+REPLACE=/^DTSTAMP:\d+T\d+Z/DTSTAMP:xx/
+REPLACE=/^DTEND:\d+T\d+Z/DTEND:xx/
+REPLACE=,^FREEBUSY:[% timestamp %]/\d+T\d+Z,FREEBUSY:[% timestamp %]/xx,
+REPLACE=,^FREEBUSY:(?![% timestamp %])\d+T\d+Z/\d+T\d+Z,FREEBUSY:xx/xx,
+
+BEGINDATA
+
+
+
+
+ENDDATA
+
+__FREEBUSY_RESULT__
+HTTP/1.1 200 OK
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+Content-Length: xx
+Content-Type: text/calendar;charset=UTF-8
+
+BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VFREEBUSY
+DTSTAMP:xx
+DTSTART:[% timestamp %]
+DTEND:xx
+FREEBUSY:[% timestamp %]/xx
+FREEBUSY:xx/xx
+END:VFREEBUSY
+END:VCALENDAR
diff --git a/testing/tests/regression-suite/2702-Past-Event.ics b/testing/tests/regression-suite/2702-Past-Event.ics
deleted file mode 100644
index e26c3ad1..00000000
--- a/testing/tests/regression-suite/2702-Past-Event.ics
+++ /dev/null
@@ -1,13 +0,0 @@
-BEGIN:VCALENDAR
-VERSION:2.0
-PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
-BEGIN:VEVENT
-CLASS:PUBLIC
-DTSTAMP:20240120T034700Z
-DTSTART;VALUE=DATE:05000917
-DTEND;VALUE=DATE:05000918
-SUMMARY:Test date in the distant future
-TRANSP:TRANSPARENT
-UID:2702-Past-Event
-END:VEVENT
-END:VCALENDAR
diff --git a/testing/tests/regression-suite/2702-Past-Event.test b/testing/tests/regression-suite/2702-Past-Event.test
deleted file mode 100644
index f6d92752..00000000
--- a/testing/tests/regression-suite/2702-Past-Event.test
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# PUT an event that is far in the past.
-#
-TYPE=PUT
-URL=http://regression.host/caldav.php/user1/home/2702-Past-Event.ics
-HEADER=User-Agent: test-suite/1.0
-HEADER=Content-Type: text/calendar; charset=utf-8
-HEAD
-#
-DATA=2702-Past-Event.ics
diff --git a/testing/tests/regression-suite/2702a-PUT-Event.result b/testing/tests/regression-suite/2702a-PUT-Event.result
new file mode 100644
index 00000000..9e1671dc
--- /dev/null
+++ b/testing/tests/regression-suite/2702a-PUT-Event.result
@@ -0,0 +1,45 @@
+HTTP/1.1 201 Created
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "a fine looking etag"
+Content-Length: 0
+Content-Type: text/plain; charset="utf-8"
+
+
+ A1 CalDAV DATA: >BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:20240120T034700Z
+DTSTART:00010102T000000Z
+DURATION:P1H
+SUMMARY:Test date in 00010102
+TRANSP:OPAQUE
+UID:2702-PUT-Event-00010102
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+<
+ caldav_type: >VEVENT<
+ class: >PUBLIC<
+ description: >NULL<
+ dtend: >NULL<
+ dtstamp: >2024-01-20 03:47:00<
+ dtstart: >NULL<
+ due: >NULL<
+ last_modified: >2024-01-20 03:47:00<
+ location: >NULL<
+ logged_user: >10<
+ percent_complete: >NULL<
+ priority: >NULL<
+ rrule: >FREQ=WEEKLY;COUNT=2<
+ status: >NULL<
+ summary: >Test date in 00010102<
+ transp: >OPAQUE<
+ tz_id: >NULL<
+ uid: >2702-PUT-Event-00010102<
+ url: >NULL<
+ user_no: >10<
+
diff --git a/testing/tests/regression-suite/2702a-PUT-Event.test b/testing/tests/regression-suite/2702a-PUT-Event.test
new file mode 100644
index 00000000..eefd7e92
--- /dev/null
+++ b/testing/tests/regression-suite/2702a-PUT-Event.test
@@ -0,0 +1,44 @@
+#
+# PUT an event in 00010102
+#
+TYPE=PUT
+URL=http://regression.host/caldav.php/user1/past-and-future/2702-PUT-Event-00010102.ics
+AUTH=user1:user1
+HEADER=User-Agent: test-suite/1.0
+HEADER=Content-Type: text/calendar; charset=utf-8
+HEAD
+#
+
+REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
+
+BEGINDATA
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:20240120T034700Z
+DTSTART:00010102T000000Z
+DURATION:P1H
+SUMMARY:Test date in 00010102
+TRANSP:OPAQUE
+UID:2702-PUT-Event-00010102
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+ENDDATA
+
+QUERY
+SELECT caldav_data.user_no, 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,
+ calendar_item.last_modified,
+ caldav_data AS "A1 CalDAV DATA"
+FROM caldav_data JOIN calendar_item USING(dav_name) LEFT JOIN timezones ON (tz_id=tzid)
+WHERE caldav_data.dav_name ~ '^/user1/past-and-future/'
+ AND uid = '2702-PUT-Event-00010102'
+ENDQUERY
+
+
diff --git a/testing/tests/regression-suite/2702b-REPORT-Event.result b/testing/tests/regression-suite/2702b-REPORT-Event.result
new file mode 100644
index 00000000..f048030e
--- /dev/null
+++ b/testing/tests/regression-suite/2702b-REPORT-Event.result
@@ -0,0 +1,34 @@
+HTTP/1.1 207 Multi-Status
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "a fine looking etag"
+Content-Length: xx
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+ /caldav.php/user1/past-and-future/2702-PUT-Event-00010102.ics
+
+
+ BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:xx
+DTSTART:00010102T000000Z
+DURATION:P1H
+SUMMARY:Test date in 00010102
+TRANSP:OPAQUE
+UID:2702-PUT-Event-00010102
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
diff --git a/testing/tests/regression-suite/2702b-REPORT-Event.test b/testing/tests/regression-suite/2702b-REPORT-Event.test
new file mode 100644
index 00000000..0f43b0a2
--- /dev/null
+++ b/testing/tests/regression-suite/2702b-REPORT-Event.test
@@ -0,0 +1,30 @@
+#
+# REPORT on event for 00010102, created by previous test.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/past-and-future/
+AUTH=user1:user1
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
+REPLACE=/^DTSTAMP:\d+T\d+Z/DTSTAMP:xx/
+REPLACE=/^Content-Length: \d+/Content-Length: xx/
+
+BEGINDATA
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENDDATA
+
diff --git a/testing/tests/regression-suite/2702c-FREEBUSY-Event.result b/testing/tests/regression-suite/2702c-FREEBUSY-Event.result
new file mode 100644
index 00000000..f3c376eb
--- /dev/null
+++ b/testing/tests/regression-suite/2702c-FREEBUSY-Event.result
@@ -0,0 +1,19 @@
+HTTP/1.1 200 OK
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+Content-Length: xx
+Content-Type: text/calendar;charset=UTF-8
+
+BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VFREEBUSY
+DTSTAMP:xx
+DTSTART:00010102T000000Z
+DTEND:xx
+FREEBUSY:00010102T000000Z/xx
+FREEBUSY:xx/xx
+END:VFREEBUSY
+END:VCALENDAR
diff --git a/testing/tests/regression-suite/2702c-FREEBUSY-Event.test b/testing/tests/regression-suite/2702c-FREEBUSY-Event.test
new file mode 100644
index 00000000..027c6359
--- /dev/null
+++ b/testing/tests/regression-suite/2702c-FREEBUSY-Event.test
@@ -0,0 +1,26 @@
+#
+# Free/Busy should show two busy periods one that starts at the timestamp
+# and another a week later. I haven't added logic to the script which
+# generates this file to work out what those other dates are, so as long
+# as we have two busy periods, we'll call that done.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/past-and-future/
+AUTH=user1:user1
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+REPLACE=/^Content-Length: [0-9]+/Content-Length: xx/
+REPLACE=/^DTSTAMP:\d+T\d+Z/DTSTAMP:xx/
+REPLACE=/^DTEND:\d+T\d+Z/DTEND:xx/
+REPLACE=,^FREEBUSY:00010102T000000Z/\d+T\d+Z,FREEBUSY:00010102T000000Z/xx,
+REPLACE=,^FREEBUSY:(?!00010102T000000Z)\d+T\d+Z/\d+T\d+Z,FREEBUSY:xx/xx,
+
+BEGINDATA
+
+
+
+
+ENDDATA
+
diff --git a/testing/tests/regression-suite/2703a-PUT-Event.result b/testing/tests/regression-suite/2703a-PUT-Event.result
new file mode 100644
index 00000000..779c3ec3
--- /dev/null
+++ b/testing/tests/regression-suite/2703a-PUT-Event.result
@@ -0,0 +1,45 @@
+HTTP/1.1 201 Created
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "a fine looking etag"
+Content-Length: 0
+Content-Type: text/plain; charset="utf-8"
+
+
+ A1 CalDAV DATA: >BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:20240120T034700Z
+DTSTART:08040229T000000Z
+DURATION:P1H
+SUMMARY:Test date in 08040229
+TRANSP:OPAQUE
+UID:2703-PUT-Event-08040229
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+<
+ caldav_type: >VEVENT<
+ class: >PUBLIC<
+ description: >NULL<
+ dtend: >NULL<
+ dtstamp: >2024-01-20 03:47:00<
+ dtstart: >NULL<
+ due: >NULL<
+ last_modified: >2024-01-20 03:47:00<
+ location: >NULL<
+ logged_user: >10<
+ percent_complete: >NULL<
+ priority: >NULL<
+ rrule: >FREQ=WEEKLY;COUNT=2<
+ status: >NULL<
+ summary: >Test date in 08040229<
+ transp: >OPAQUE<
+ tz_id: >NULL<
+ uid: >2703-PUT-Event-08040229<
+ url: >NULL<
+ user_no: >10<
+
diff --git a/testing/tests/regression-suite/2703a-PUT-Event.test b/testing/tests/regression-suite/2703a-PUT-Event.test
new file mode 100644
index 00000000..67e89df7
--- /dev/null
+++ b/testing/tests/regression-suite/2703a-PUT-Event.test
@@ -0,0 +1,44 @@
+#
+# PUT an event in 08040229
+#
+TYPE=PUT
+URL=http://regression.host/caldav.php/user1/past-and-future/2703-PUT-Event-08040229.ics
+AUTH=user1:user1
+HEADER=User-Agent: test-suite/1.0
+HEADER=Content-Type: text/calendar; charset=utf-8
+HEAD
+#
+
+REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
+
+BEGINDATA
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:20240120T034700Z
+DTSTART:08040229T000000Z
+DURATION:P1H
+SUMMARY:Test date in 08040229
+TRANSP:OPAQUE
+UID:2703-PUT-Event-08040229
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+ENDDATA
+
+QUERY
+SELECT caldav_data.user_no, 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,
+ calendar_item.last_modified,
+ caldav_data AS "A1 CalDAV DATA"
+FROM caldav_data JOIN calendar_item USING(dav_name) LEFT JOIN timezones ON (tz_id=tzid)
+WHERE caldav_data.dav_name ~ '^/user1/past-and-future/'
+ AND uid = '2703-PUT-Event-08040229'
+ENDQUERY
+
+
diff --git a/testing/tests/regression-suite/2703b-REPORT-Event.result b/testing/tests/regression-suite/2703b-REPORT-Event.result
new file mode 100644
index 00000000..b2d0a9f7
--- /dev/null
+++ b/testing/tests/regression-suite/2703b-REPORT-Event.result
@@ -0,0 +1,34 @@
+HTTP/1.1 207 Multi-Status
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "a fine looking etag"
+Content-Length: xx
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+ /caldav.php/user1/past-and-future/2703-PUT-Event-08040229.ics
+
+
+ BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:xx
+DTSTART:08040229T000000Z
+DURATION:P1H
+SUMMARY:Test date in 08040229
+TRANSP:OPAQUE
+UID:2703-PUT-Event-08040229
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
diff --git a/testing/tests/regression-suite/2703b-REPORT-Event.test b/testing/tests/regression-suite/2703b-REPORT-Event.test
new file mode 100644
index 00000000..e96ffb47
--- /dev/null
+++ b/testing/tests/regression-suite/2703b-REPORT-Event.test
@@ -0,0 +1,30 @@
+#
+# REPORT on event for 08040229, created by previous test.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/past-and-future/
+AUTH=user1:user1
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
+REPLACE=/^DTSTAMP:\d+T\d+Z/DTSTAMP:xx/
+REPLACE=/^Content-Length: \d+/Content-Length: xx/
+
+BEGINDATA
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENDDATA
+
diff --git a/testing/tests/regression-suite/2703c-FREEBUSY-Event.result b/testing/tests/regression-suite/2703c-FREEBUSY-Event.result
new file mode 100644
index 00000000..09a23714
--- /dev/null
+++ b/testing/tests/regression-suite/2703c-FREEBUSY-Event.result
@@ -0,0 +1,19 @@
+HTTP/1.1 200 OK
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+Content-Length: xx
+Content-Type: text/calendar;charset=UTF-8
+
+BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VFREEBUSY
+DTSTAMP:xx
+DTSTART:08040229T000000Z
+DTEND:xx
+FREEBUSY:08040229T000000Z/xx
+FREEBUSY:xx/xx
+END:VFREEBUSY
+END:VCALENDAR
diff --git a/testing/tests/regression-suite/2703c-FREEBUSY-Event.test b/testing/tests/regression-suite/2703c-FREEBUSY-Event.test
new file mode 100644
index 00000000..2130a491
--- /dev/null
+++ b/testing/tests/regression-suite/2703c-FREEBUSY-Event.test
@@ -0,0 +1,26 @@
+#
+# Free/Busy should show two busy periods one that starts at the timestamp
+# and another a week later. I haven't added logic to the script which
+# generates this file to work out what those other dates are, so as long
+# as we have two busy periods, we'll call that done.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/past-and-future/
+AUTH=user1:user1
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+REPLACE=/^Content-Length: [0-9]+/Content-Length: xx/
+REPLACE=/^DTSTAMP:\d+T\d+Z/DTSTAMP:xx/
+REPLACE=/^DTEND:\d+T\d+Z/DTEND:xx/
+REPLACE=,^FREEBUSY:08040229T000000Z/\d+T\d+Z,FREEBUSY:08040229T000000Z/xx,
+REPLACE=,^FREEBUSY:(?!08040229T000000Z)\d+T\d+Z/\d+T\d+Z,FREEBUSY:xx/xx,
+
+BEGINDATA
+
+
+
+
+ENDDATA
+
diff --git a/testing/tests/regression-suite/2704a-PUT-Event.result b/testing/tests/regression-suite/2704a-PUT-Event.result
new file mode 100644
index 00000000..4c7813da
--- /dev/null
+++ b/testing/tests/regression-suite/2704a-PUT-Event.result
@@ -0,0 +1,45 @@
+HTTP/1.1 201 Created
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "a fine looking etag"
+Content-Length: 0
+Content-Type: text/plain; charset="utf-8"
+
+
+ A1 CalDAV DATA: >BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:20240120T034700Z
+DTSTART:18500820T000000Z
+DURATION:P1H
+SUMMARY:Test date in 18500820
+TRANSP:OPAQUE
+UID:2704-PUT-Event-18500820
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+<
+ caldav_type: >VEVENT<
+ class: >PUBLIC<
+ description: >NULL<
+ dtend: >NULL<
+ dtstamp: >2024-01-20 03:47:00<
+ dtstart: >NULL<
+ due: >NULL<
+ last_modified: >2024-01-20 03:47:00<
+ location: >NULL<
+ logged_user: >10<
+ percent_complete: >NULL<
+ priority: >NULL<
+ rrule: >FREQ=WEEKLY;COUNT=2<
+ status: >NULL<
+ summary: >Test date in 18500820<
+ transp: >OPAQUE<
+ tz_id: >NULL<
+ uid: >2704-PUT-Event-18500820<
+ url: >NULL<
+ user_no: >10<
+
diff --git a/testing/tests/regression-suite/2704a-PUT-Event.test b/testing/tests/regression-suite/2704a-PUT-Event.test
new file mode 100644
index 00000000..402c97c6
--- /dev/null
+++ b/testing/tests/regression-suite/2704a-PUT-Event.test
@@ -0,0 +1,44 @@
+#
+# PUT an event in 18500820
+#
+TYPE=PUT
+URL=http://regression.host/caldav.php/user1/past-and-future/2704-PUT-Event-18500820.ics
+AUTH=user1:user1
+HEADER=User-Agent: test-suite/1.0
+HEADER=Content-Type: text/calendar; charset=utf-8
+HEAD
+#
+
+REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
+
+BEGINDATA
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:20240120T034700Z
+DTSTART:18500820T000000Z
+DURATION:P1H
+SUMMARY:Test date in 18500820
+TRANSP:OPAQUE
+UID:2704-PUT-Event-18500820
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+ENDDATA
+
+QUERY
+SELECT caldav_data.user_no, 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,
+ calendar_item.last_modified,
+ caldav_data AS "A1 CalDAV DATA"
+FROM caldav_data JOIN calendar_item USING(dav_name) LEFT JOIN timezones ON (tz_id=tzid)
+WHERE caldav_data.dav_name ~ '^/user1/past-and-future/'
+ AND uid = '2704-PUT-Event-18500820'
+ENDQUERY
+
+
diff --git a/testing/tests/regression-suite/2704b-REPORT-Event.result b/testing/tests/regression-suite/2704b-REPORT-Event.result
new file mode 100644
index 00000000..4e37a2fa
--- /dev/null
+++ b/testing/tests/regression-suite/2704b-REPORT-Event.result
@@ -0,0 +1,34 @@
+HTTP/1.1 207 Multi-Status
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "a fine looking etag"
+Content-Length: xx
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+ /caldav.php/user1/past-and-future/2704-PUT-Event-18500820.ics
+
+
+ BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:xx
+DTSTART:18500820T000000Z
+DURATION:P1H
+SUMMARY:Test date in 18500820
+TRANSP:OPAQUE
+UID:2704-PUT-Event-18500820
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
diff --git a/testing/tests/regression-suite/2704b-REPORT-Event.test b/testing/tests/regression-suite/2704b-REPORT-Event.test
new file mode 100644
index 00000000..b256e026
--- /dev/null
+++ b/testing/tests/regression-suite/2704b-REPORT-Event.test
@@ -0,0 +1,30 @@
+#
+# REPORT on event for 18500820, created by previous test.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/past-and-future/
+AUTH=user1:user1
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
+REPLACE=/^DTSTAMP:\d+T\d+Z/DTSTAMP:xx/
+REPLACE=/^Content-Length: \d+/Content-Length: xx/
+
+BEGINDATA
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENDDATA
+
diff --git a/testing/tests/regression-suite/2704c-FREEBUSY-Event.result b/testing/tests/regression-suite/2704c-FREEBUSY-Event.result
new file mode 100644
index 00000000..214011ab
--- /dev/null
+++ b/testing/tests/regression-suite/2704c-FREEBUSY-Event.result
@@ -0,0 +1,19 @@
+HTTP/1.1 200 OK
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+Content-Length: xx
+Content-Type: text/calendar;charset=UTF-8
+
+BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VFREEBUSY
+DTSTAMP:xx
+DTSTART:18500820T000000Z
+DTEND:xx
+FREEBUSY:18500820T000000Z/xx
+FREEBUSY:xx/xx
+END:VFREEBUSY
+END:VCALENDAR
diff --git a/testing/tests/regression-suite/2704c-FREEBUSY-Event.test b/testing/tests/regression-suite/2704c-FREEBUSY-Event.test
new file mode 100644
index 00000000..febf4449
--- /dev/null
+++ b/testing/tests/regression-suite/2704c-FREEBUSY-Event.test
@@ -0,0 +1,26 @@
+#
+# Free/Busy should show two busy periods one that starts at the timestamp
+# and another a week later. I haven't added logic to the script which
+# generates this file to work out what those other dates are, so as long
+# as we have two busy periods, we'll call that done.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/past-and-future/
+AUTH=user1:user1
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+REPLACE=/^Content-Length: [0-9]+/Content-Length: xx/
+REPLACE=/^DTSTAMP:\d+T\d+Z/DTSTAMP:xx/
+REPLACE=/^DTEND:\d+T\d+Z/DTEND:xx/
+REPLACE=,^FREEBUSY:18500820T000000Z/\d+T\d+Z,FREEBUSY:18500820T000000Z/xx,
+REPLACE=,^FREEBUSY:(?!18500820T000000Z)\d+T\d+Z/\d+T\d+Z,FREEBUSY:xx/xx,
+
+BEGINDATA
+
+
+
+
+ENDDATA
+
diff --git a/testing/tests/regression-suite/2705a-PUT-Event.result b/testing/tests/regression-suite/2705a-PUT-Event.result
new file mode 100644
index 00000000..5e817d0b
--- /dev/null
+++ b/testing/tests/regression-suite/2705a-PUT-Event.result
@@ -0,0 +1,45 @@
+HTTP/1.1 201 Created
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "a fine looking etag"
+Content-Length: 0
+Content-Type: text/plain; charset="utf-8"
+
+
+ A1 CalDAV DATA: >BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:20240120T034700Z
+DTSTART:19010101T000000Z
+DURATION:P1H
+SUMMARY:Test date in 19010101
+TRANSP:OPAQUE
+UID:2705-PUT-Event-19010101
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+<
+ caldav_type: >VEVENT<
+ class: >PUBLIC<
+ description: >NULL<
+ dtend: >NULL<
+ dtstamp: >2024-01-20 03:47:00<
+ dtstart: >NULL<
+ due: >NULL<
+ last_modified: >2024-01-20 03:47:00<
+ location: >NULL<
+ logged_user: >10<
+ percent_complete: >NULL<
+ priority: >NULL<
+ rrule: >FREQ=WEEKLY;COUNT=2<
+ status: >NULL<
+ summary: >Test date in 19010101<
+ transp: >OPAQUE<
+ tz_id: >NULL<
+ uid: >2705-PUT-Event-19010101<
+ url: >NULL<
+ user_no: >10<
+
diff --git a/testing/tests/regression-suite/2705a-PUT-Event.test b/testing/tests/regression-suite/2705a-PUT-Event.test
new file mode 100644
index 00000000..3c40d008
--- /dev/null
+++ b/testing/tests/regression-suite/2705a-PUT-Event.test
@@ -0,0 +1,44 @@
+#
+# PUT an event in 19010101
+#
+TYPE=PUT
+URL=http://regression.host/caldav.php/user1/past-and-future/2705-PUT-Event-19010101.ics
+AUTH=user1:user1
+HEADER=User-Agent: test-suite/1.0
+HEADER=Content-Type: text/calendar; charset=utf-8
+HEAD
+#
+
+REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
+
+BEGINDATA
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:20240120T034700Z
+DTSTART:19010101T000000Z
+DURATION:P1H
+SUMMARY:Test date in 19010101
+TRANSP:OPAQUE
+UID:2705-PUT-Event-19010101
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+ENDDATA
+
+QUERY
+SELECT caldav_data.user_no, 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,
+ calendar_item.last_modified,
+ caldav_data AS "A1 CalDAV DATA"
+FROM caldav_data JOIN calendar_item USING(dav_name) LEFT JOIN timezones ON (tz_id=tzid)
+WHERE caldav_data.dav_name ~ '^/user1/past-and-future/'
+ AND uid = '2705-PUT-Event-19010101'
+ENDQUERY
+
+
diff --git a/testing/tests/regression-suite/2705b-REPORT-Event.result b/testing/tests/regression-suite/2705b-REPORT-Event.result
new file mode 100644
index 00000000..391dc231
--- /dev/null
+++ b/testing/tests/regression-suite/2705b-REPORT-Event.result
@@ -0,0 +1,34 @@
+HTTP/1.1 207 Multi-Status
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "a fine looking etag"
+Content-Length: xx
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+ /caldav.php/user1/past-and-future/2705-PUT-Event-19010101.ics
+
+
+ BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:xx
+DTSTART:19010101T000000Z
+DURATION:P1H
+SUMMARY:Test date in 19010101
+TRANSP:OPAQUE
+UID:2705-PUT-Event-19010101
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
diff --git a/testing/tests/regression-suite/2705b-REPORT-Event.test b/testing/tests/regression-suite/2705b-REPORT-Event.test
new file mode 100644
index 00000000..73bde7ac
--- /dev/null
+++ b/testing/tests/regression-suite/2705b-REPORT-Event.test
@@ -0,0 +1,30 @@
+#
+# REPORT on event for 19010101, created by previous test.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/past-and-future/
+AUTH=user1:user1
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
+REPLACE=/^DTSTAMP:\d+T\d+Z/DTSTAMP:xx/
+REPLACE=/^Content-Length: \d+/Content-Length: xx/
+
+BEGINDATA
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENDDATA
+
diff --git a/testing/tests/regression-suite/2705c-FREEBUSY-Event.result b/testing/tests/regression-suite/2705c-FREEBUSY-Event.result
new file mode 100644
index 00000000..fbd381b2
--- /dev/null
+++ b/testing/tests/regression-suite/2705c-FREEBUSY-Event.result
@@ -0,0 +1,19 @@
+HTTP/1.1 200 OK
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+Content-Length: xx
+Content-Type: text/calendar;charset=UTF-8
+
+BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VFREEBUSY
+DTSTAMP:xx
+DTSTART:19010101T000000Z
+DTEND:xx
+FREEBUSY:19010101T000000Z/xx
+FREEBUSY:xx/xx
+END:VFREEBUSY
+END:VCALENDAR
diff --git a/testing/tests/regression-suite/2705c-FREEBUSY-Event.test b/testing/tests/regression-suite/2705c-FREEBUSY-Event.test
new file mode 100644
index 00000000..c64d709c
--- /dev/null
+++ b/testing/tests/regression-suite/2705c-FREEBUSY-Event.test
@@ -0,0 +1,26 @@
+#
+# Free/Busy should show two busy periods one that starts at the timestamp
+# and another a week later. I haven't added logic to the script which
+# generates this file to work out what those other dates are, so as long
+# as we have two busy periods, we'll call that done.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/past-and-future/
+AUTH=user1:user1
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+REPLACE=/^Content-Length: [0-9]+/Content-Length: xx/
+REPLACE=/^DTSTAMP:\d+T\d+Z/DTSTAMP:xx/
+REPLACE=/^DTEND:\d+T\d+Z/DTEND:xx/
+REPLACE=,^FREEBUSY:19010101T000000Z/\d+T\d+Z,FREEBUSY:19010101T000000Z/xx,
+REPLACE=,^FREEBUSY:(?!19010101T000000Z)\d+T\d+Z/\d+T\d+Z,FREEBUSY:xx/xx,
+
+BEGINDATA
+
+
+
+
+ENDDATA
+
diff --git a/testing/tests/regression-suite/2706a-PUT-Event.result b/testing/tests/regression-suite/2706a-PUT-Event.result
new file mode 100644
index 00000000..162443fc
--- /dev/null
+++ b/testing/tests/regression-suite/2706a-PUT-Event.result
@@ -0,0 +1,45 @@
+HTTP/1.1 201 Created
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "a fine looking etag"
+Content-Length: 0
+Content-Type: text/plain; charset="utf-8"
+
+
+ A1 CalDAV DATA: >BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:20240120T034700Z
+DTSTART:20000101T000000Z
+DURATION:P1H
+SUMMARY:Test date in 20000101
+TRANSP:OPAQUE
+UID:2706-PUT-Event-20000101
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+<
+ caldav_type: >VEVENT<
+ class: >PUBLIC<
+ description: >NULL<
+ dtend: >NULL<
+ dtstamp: >2024-01-20 03:47:00<
+ dtstart: >NULL<
+ due: >NULL<
+ last_modified: >2024-01-20 03:47:00<
+ location: >NULL<
+ logged_user: >10<
+ percent_complete: >NULL<
+ priority: >NULL<
+ rrule: >FREQ=WEEKLY;COUNT=2<
+ status: >NULL<
+ summary: >Test date in 20000101<
+ transp: >OPAQUE<
+ tz_id: >NULL<
+ uid: >2706-PUT-Event-20000101<
+ url: >NULL<
+ user_no: >10<
+
diff --git a/testing/tests/regression-suite/2706a-PUT-Event.test b/testing/tests/regression-suite/2706a-PUT-Event.test
new file mode 100644
index 00000000..c28dbe02
--- /dev/null
+++ b/testing/tests/regression-suite/2706a-PUT-Event.test
@@ -0,0 +1,44 @@
+#
+# PUT an event in 20000101
+#
+TYPE=PUT
+URL=http://regression.host/caldav.php/user1/past-and-future/2706-PUT-Event-20000101.ics
+AUTH=user1:user1
+HEADER=User-Agent: test-suite/1.0
+HEADER=Content-Type: text/calendar; charset=utf-8
+HEAD
+#
+
+REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
+
+BEGINDATA
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:20240120T034700Z
+DTSTART:20000101T000000Z
+DURATION:P1H
+SUMMARY:Test date in 20000101
+TRANSP:OPAQUE
+UID:2706-PUT-Event-20000101
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+ENDDATA
+
+QUERY
+SELECT caldav_data.user_no, 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,
+ calendar_item.last_modified,
+ caldav_data AS "A1 CalDAV DATA"
+FROM caldav_data JOIN calendar_item USING(dav_name) LEFT JOIN timezones ON (tz_id=tzid)
+WHERE caldav_data.dav_name ~ '^/user1/past-and-future/'
+ AND uid = '2706-PUT-Event-20000101'
+ENDQUERY
+
+
diff --git a/testing/tests/regression-suite/2706b-REPORT-Event.result b/testing/tests/regression-suite/2706b-REPORT-Event.result
new file mode 100644
index 00000000..bf85d0b4
--- /dev/null
+++ b/testing/tests/regression-suite/2706b-REPORT-Event.result
@@ -0,0 +1,34 @@
+HTTP/1.1 207 Multi-Status
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "a fine looking etag"
+Content-Length: xx
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+ /caldav.php/user1/past-and-future/2706-PUT-Event-20000101.ics
+
+
+ BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:xx
+DTSTART:20000101T000000Z
+DURATION:P1H
+SUMMARY:Test date in 20000101
+TRANSP:OPAQUE
+UID:2706-PUT-Event-20000101
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
diff --git a/testing/tests/regression-suite/2706b-REPORT-Event.test b/testing/tests/regression-suite/2706b-REPORT-Event.test
new file mode 100644
index 00000000..c974f61f
--- /dev/null
+++ b/testing/tests/regression-suite/2706b-REPORT-Event.test
@@ -0,0 +1,30 @@
+#
+# REPORT on event for 20000101, created by previous test.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/past-and-future/
+AUTH=user1:user1
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
+REPLACE=/^DTSTAMP:\d+T\d+Z/DTSTAMP:xx/
+REPLACE=/^Content-Length: \d+/Content-Length: xx/
+
+BEGINDATA
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENDDATA
+
diff --git a/testing/tests/regression-suite/2706c-FREEBUSY-Event.result b/testing/tests/regression-suite/2706c-FREEBUSY-Event.result
new file mode 100644
index 00000000..9ca69961
--- /dev/null
+++ b/testing/tests/regression-suite/2706c-FREEBUSY-Event.result
@@ -0,0 +1,19 @@
+HTTP/1.1 200 OK
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+Content-Length: xx
+Content-Type: text/calendar;charset=UTF-8
+
+BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VFREEBUSY
+DTSTAMP:xx
+DTSTART:20000101T000000Z
+DTEND:xx
+FREEBUSY:20000101T000000Z/xx
+FREEBUSY:xx/xx
+END:VFREEBUSY
+END:VCALENDAR
diff --git a/testing/tests/regression-suite/2706c-FREEBUSY-Event.test b/testing/tests/regression-suite/2706c-FREEBUSY-Event.test
new file mode 100644
index 00000000..ea0a7189
--- /dev/null
+++ b/testing/tests/regression-suite/2706c-FREEBUSY-Event.test
@@ -0,0 +1,26 @@
+#
+# Free/Busy should show two busy periods one that starts at the timestamp
+# and another a week later. I haven't added logic to the script which
+# generates this file to work out what those other dates are, so as long
+# as we have two busy periods, we'll call that done.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/past-and-future/
+AUTH=user1:user1
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+REPLACE=/^Content-Length: [0-9]+/Content-Length: xx/
+REPLACE=/^DTSTAMP:\d+T\d+Z/DTSTAMP:xx/
+REPLACE=/^DTEND:\d+T\d+Z/DTEND:xx/
+REPLACE=,^FREEBUSY:20000101T000000Z/\d+T\d+Z,FREEBUSY:20000101T000000Z/xx,
+REPLACE=,^FREEBUSY:(?!20000101T000000Z)\d+T\d+Z/\d+T\d+Z,FREEBUSY:xx/xx,
+
+BEGINDATA
+
+
+
+
+ENDDATA
+
diff --git a/testing/tests/regression-suite/2707a-PUT-Event.result b/testing/tests/regression-suite/2707a-PUT-Event.result
new file mode 100644
index 00000000..aae33fca
--- /dev/null
+++ b/testing/tests/regression-suite/2707a-PUT-Event.result
@@ -0,0 +1,45 @@
+HTTP/1.1 201 Created
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "a fine looking etag"
+Content-Length: 0
+Content-Type: text/plain; charset="utf-8"
+
+
+ A1 CalDAV DATA: >BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:20240120T034700Z
+DTSTART:30000101T000000Z
+DURATION:P1H
+SUMMARY:Test date in 30000101
+TRANSP:OPAQUE
+UID:2707-PUT-Event-30000101
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+<
+ caldav_type: >VEVENT<
+ class: >PUBLIC<
+ description: >NULL<
+ dtend: >NULL<
+ dtstamp: >2024-01-20 03:47:00<
+ dtstart: >NULL<
+ due: >NULL<
+ last_modified: >2024-01-20 03:47:00<
+ location: >NULL<
+ logged_user: >10<
+ percent_complete: >NULL<
+ priority: >NULL<
+ rrule: >FREQ=WEEKLY;COUNT=2<
+ status: >NULL<
+ summary: >Test date in 30000101<
+ transp: >OPAQUE<
+ tz_id: >NULL<
+ uid: >2707-PUT-Event-30000101<
+ url: >NULL<
+ user_no: >10<
+
diff --git a/testing/tests/regression-suite/2707a-PUT-Event.test b/testing/tests/regression-suite/2707a-PUT-Event.test
new file mode 100644
index 00000000..3c4f4e0b
--- /dev/null
+++ b/testing/tests/regression-suite/2707a-PUT-Event.test
@@ -0,0 +1,44 @@
+#
+# PUT an event in 30000101
+#
+TYPE=PUT
+URL=http://regression.host/caldav.php/user1/past-and-future/2707-PUT-Event-30000101.ics
+AUTH=user1:user1
+HEADER=User-Agent: test-suite/1.0
+HEADER=Content-Type: text/calendar; charset=utf-8
+HEAD
+#
+
+REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
+
+BEGINDATA
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:20240120T034700Z
+DTSTART:30000101T000000Z
+DURATION:P1H
+SUMMARY:Test date in 30000101
+TRANSP:OPAQUE
+UID:2707-PUT-Event-30000101
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+ENDDATA
+
+QUERY
+SELECT caldav_data.user_no, 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,
+ calendar_item.last_modified,
+ caldav_data AS "A1 CalDAV DATA"
+FROM caldav_data JOIN calendar_item USING(dav_name) LEFT JOIN timezones ON (tz_id=tzid)
+WHERE caldav_data.dav_name ~ '^/user1/past-and-future/'
+ AND uid = '2707-PUT-Event-30000101'
+ENDQUERY
+
+
diff --git a/testing/tests/regression-suite/2707b-REPORT-Event.result b/testing/tests/regression-suite/2707b-REPORT-Event.result
new file mode 100644
index 00000000..61a00ba4
--- /dev/null
+++ b/testing/tests/regression-suite/2707b-REPORT-Event.result
@@ -0,0 +1,34 @@
+HTTP/1.1 207 Multi-Status
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "a fine looking etag"
+Content-Length: xx
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+ /caldav.php/user1/past-and-future/2707-PUT-Event-30000101.ics
+
+
+ BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:xx
+DTSTART:30000101T000000Z
+DURATION:P1H
+SUMMARY:Test date in 30000101
+TRANSP:OPAQUE
+UID:2707-PUT-Event-30000101
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
diff --git a/testing/tests/regression-suite/2707b-REPORT-Event.test b/testing/tests/regression-suite/2707b-REPORT-Event.test
new file mode 100644
index 00000000..01f4c034
--- /dev/null
+++ b/testing/tests/regression-suite/2707b-REPORT-Event.test
@@ -0,0 +1,30 @@
+#
+# REPORT on event for 30000101, created by previous test.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/past-and-future/
+AUTH=user1:user1
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
+REPLACE=/^DTSTAMP:\d+T\d+Z/DTSTAMP:xx/
+REPLACE=/^Content-Length: \d+/Content-Length: xx/
+
+BEGINDATA
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENDDATA
+
diff --git a/testing/tests/regression-suite/2707c-FREEBUSY-Event.result b/testing/tests/regression-suite/2707c-FREEBUSY-Event.result
new file mode 100644
index 00000000..9f06bf6a
--- /dev/null
+++ b/testing/tests/regression-suite/2707c-FREEBUSY-Event.result
@@ -0,0 +1,19 @@
+HTTP/1.1 200 OK
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+Content-Length: xx
+Content-Type: text/calendar;charset=UTF-8
+
+BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VFREEBUSY
+DTSTAMP:xx
+DTSTART:30000101T000000Z
+DTEND:xx
+FREEBUSY:30000101T000000Z/xx
+FREEBUSY:xx/xx
+END:VFREEBUSY
+END:VCALENDAR
diff --git a/testing/tests/regression-suite/2707c-FREEBUSY-Event.test b/testing/tests/regression-suite/2707c-FREEBUSY-Event.test
new file mode 100644
index 00000000..ee2b63e9
--- /dev/null
+++ b/testing/tests/regression-suite/2707c-FREEBUSY-Event.test
@@ -0,0 +1,26 @@
+#
+# Free/Busy should show two busy periods one that starts at the timestamp
+# and another a week later. I haven't added logic to the script which
+# generates this file to work out what those other dates are, so as long
+# as we have two busy periods, we'll call that done.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/past-and-future/
+AUTH=user1:user1
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+REPLACE=/^Content-Length: [0-9]+/Content-Length: xx/
+REPLACE=/^DTSTAMP:\d+T\d+Z/DTSTAMP:xx/
+REPLACE=/^DTEND:\d+T\d+Z/DTEND:xx/
+REPLACE=,^FREEBUSY:30000101T000000Z/\d+T\d+Z,FREEBUSY:30000101T000000Z/xx,
+REPLACE=,^FREEBUSY:(?!30000101T000000Z)\d+T\d+Z/\d+T\d+Z,FREEBUSY:xx/xx,
+
+BEGINDATA
+
+
+
+
+ENDDATA
+
diff --git a/testing/tests/regression-suite/2708a-PUT-Event.result b/testing/tests/regression-suite/2708a-PUT-Event.result
new file mode 100644
index 00000000..87aafaed
--- /dev/null
+++ b/testing/tests/regression-suite/2708a-PUT-Event.result
@@ -0,0 +1,45 @@
+HTTP/1.1 201 Created
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "a fine looking etag"
+Content-Length: 0
+Content-Type: text/plain; charset="utf-8"
+
+
+ A1 CalDAV DATA: >BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:20240120T034700Z
+DTSTART:50000701T000000Z
+DURATION:P1H
+SUMMARY:Test date in 50000701
+TRANSP:OPAQUE
+UID:2708-PUT-Event-50000701
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+<
+ caldav_type: >VEVENT<
+ class: >PUBLIC<
+ description: >NULL<
+ dtend: >NULL<
+ dtstamp: >2024-01-20 03:47:00<
+ dtstart: >NULL<
+ due: >NULL<
+ last_modified: >2024-01-20 03:47:00<
+ location: >NULL<
+ logged_user: >10<
+ percent_complete: >NULL<
+ priority: >NULL<
+ rrule: >FREQ=WEEKLY;COUNT=2<
+ status: >NULL<
+ summary: >Test date in 50000701<
+ transp: >OPAQUE<
+ tz_id: >NULL<
+ uid: >2708-PUT-Event-50000701<
+ url: >NULL<
+ user_no: >10<
+
diff --git a/testing/tests/regression-suite/2708a-PUT-Event.test b/testing/tests/regression-suite/2708a-PUT-Event.test
new file mode 100644
index 00000000..c3b0bb73
--- /dev/null
+++ b/testing/tests/regression-suite/2708a-PUT-Event.test
@@ -0,0 +1,44 @@
+#
+# PUT an event in 50000701
+#
+TYPE=PUT
+URL=http://regression.host/caldav.php/user1/past-and-future/2708-PUT-Event-50000701.ics
+AUTH=user1:user1
+HEADER=User-Agent: test-suite/1.0
+HEADER=Content-Type: text/calendar; charset=utf-8
+HEAD
+#
+
+REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
+
+BEGINDATA
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:20240120T034700Z
+DTSTART:50000701T000000Z
+DURATION:P1H
+SUMMARY:Test date in 50000701
+TRANSP:OPAQUE
+UID:2708-PUT-Event-50000701
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+ENDDATA
+
+QUERY
+SELECT caldav_data.user_no, 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,
+ calendar_item.last_modified,
+ caldav_data AS "A1 CalDAV DATA"
+FROM caldav_data JOIN calendar_item USING(dav_name) LEFT JOIN timezones ON (tz_id=tzid)
+WHERE caldav_data.dav_name ~ '^/user1/past-and-future/'
+ AND uid = '2708-PUT-Event-50000701'
+ENDQUERY
+
+
diff --git a/testing/tests/regression-suite/2708b-REPORT-Event.result b/testing/tests/regression-suite/2708b-REPORT-Event.result
new file mode 100644
index 00000000..2213efde
--- /dev/null
+++ b/testing/tests/regression-suite/2708b-REPORT-Event.result
@@ -0,0 +1,34 @@
+HTTP/1.1 207 Multi-Status
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "a fine looking etag"
+Content-Length: xx
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+ /caldav.php/user1/past-and-future/2708-PUT-Event-50000701.ics
+
+
+ BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:xx
+DTSTART:50000701T000000Z
+DURATION:P1H
+SUMMARY:Test date in 50000701
+TRANSP:OPAQUE
+UID:2708-PUT-Event-50000701
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
diff --git a/testing/tests/regression-suite/2708b-REPORT-Event.test b/testing/tests/regression-suite/2708b-REPORT-Event.test
new file mode 100644
index 00000000..cd2fc193
--- /dev/null
+++ b/testing/tests/regression-suite/2708b-REPORT-Event.test
@@ -0,0 +1,30 @@
+#
+# REPORT on event for 50000701, created by previous test.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/past-and-future/
+AUTH=user1:user1
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
+REPLACE=/^DTSTAMP:\d+T\d+Z/DTSTAMP:xx/
+REPLACE=/^Content-Length: \d+/Content-Length: xx/
+
+BEGINDATA
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENDDATA
+
diff --git a/testing/tests/regression-suite/2708c-FREEBUSY-Event.result b/testing/tests/regression-suite/2708c-FREEBUSY-Event.result
new file mode 100644
index 00000000..7234a71d
--- /dev/null
+++ b/testing/tests/regression-suite/2708c-FREEBUSY-Event.result
@@ -0,0 +1,19 @@
+HTTP/1.1 200 OK
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+Content-Length: xx
+Content-Type: text/calendar;charset=UTF-8
+
+BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VFREEBUSY
+DTSTAMP:xx
+DTSTART:50000701T000000Z
+DTEND:xx
+FREEBUSY:50000701T000000Z/xx
+FREEBUSY:xx/xx
+END:VFREEBUSY
+END:VCALENDAR
diff --git a/testing/tests/regression-suite/2708c-FREEBUSY-Event.test b/testing/tests/regression-suite/2708c-FREEBUSY-Event.test
new file mode 100644
index 00000000..3cd8299e
--- /dev/null
+++ b/testing/tests/regression-suite/2708c-FREEBUSY-Event.test
@@ -0,0 +1,26 @@
+#
+# Free/Busy should show two busy periods one that starts at the timestamp
+# and another a week later. I haven't added logic to the script which
+# generates this file to work out what those other dates are, so as long
+# as we have two busy periods, we'll call that done.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/past-and-future/
+AUTH=user1:user1
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+REPLACE=/^Content-Length: [0-9]+/Content-Length: xx/
+REPLACE=/^DTSTAMP:\d+T\d+Z/DTSTAMP:xx/
+REPLACE=/^DTEND:\d+T\d+Z/DTEND:xx/
+REPLACE=,^FREEBUSY:50000701T000000Z/\d+T\d+Z,FREEBUSY:50000701T000000Z/xx,
+REPLACE=,^FREEBUSY:(?!50000701T000000Z)\d+T\d+Z/\d+T\d+Z,FREEBUSY:xx/xx,
+
+BEGINDATA
+
+
+
+
+ENDDATA
+
diff --git a/testing/tests/regression-suite/2709a-PUT-Event.result b/testing/tests/regression-suite/2709a-PUT-Event.result
new file mode 100644
index 00000000..710c4fbb
--- /dev/null
+++ b/testing/tests/regression-suite/2709a-PUT-Event.result
@@ -0,0 +1,45 @@
+HTTP/1.1 201 Created
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "a fine looking etag"
+Content-Length: 0
+Content-Type: text/plain; charset="utf-8"
+
+
+ A1 CalDAV DATA: >BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:20240120T034700Z
+DTSTART:99970820T000000Z
+DURATION:P1H
+SUMMARY:Test date in 99970820
+TRANSP:OPAQUE
+UID:2709-PUT-Event-99970820
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+<
+ caldav_type: >VEVENT<
+ class: >PUBLIC<
+ description: >NULL<
+ dtend: >NULL<
+ dtstamp: >2024-01-20 03:47:00<
+ dtstart: >NULL<
+ due: >NULL<
+ last_modified: >2024-01-20 03:47:00<
+ location: >NULL<
+ logged_user: >10<
+ percent_complete: >NULL<
+ priority: >NULL<
+ rrule: >FREQ=WEEKLY;COUNT=2<
+ status: >NULL<
+ summary: >Test date in 99970820<
+ transp: >OPAQUE<
+ tz_id: >NULL<
+ uid: >2709-PUT-Event-99970820<
+ url: >NULL<
+ user_no: >10<
+
diff --git a/testing/tests/regression-suite/2709a-PUT-Event.test b/testing/tests/regression-suite/2709a-PUT-Event.test
new file mode 100644
index 00000000..5b35e42c
--- /dev/null
+++ b/testing/tests/regression-suite/2709a-PUT-Event.test
@@ -0,0 +1,44 @@
+#
+# PUT an event in 99970820
+#
+TYPE=PUT
+URL=http://regression.host/caldav.php/user1/past-and-future/2709-PUT-Event-99970820.ics
+AUTH=user1:user1
+HEADER=User-Agent: test-suite/1.0
+HEADER=Content-Type: text/calendar; charset=utf-8
+HEAD
+#
+
+REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
+
+BEGINDATA
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:20240120T034700Z
+DTSTART:99970820T000000Z
+DURATION:P1H
+SUMMARY:Test date in 99970820
+TRANSP:OPAQUE
+UID:2709-PUT-Event-99970820
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+ENDDATA
+
+QUERY
+SELECT caldav_data.user_no, 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,
+ calendar_item.last_modified,
+ caldav_data AS "A1 CalDAV DATA"
+FROM caldav_data JOIN calendar_item USING(dav_name) LEFT JOIN timezones ON (tz_id=tzid)
+WHERE caldav_data.dav_name ~ '^/user1/past-and-future/'
+ AND uid = '2709-PUT-Event-99970820'
+ENDQUERY
+
+
diff --git a/testing/tests/regression-suite/2709b-REPORT-Event.result b/testing/tests/regression-suite/2709b-REPORT-Event.result
new file mode 100644
index 00000000..2b8eb859
--- /dev/null
+++ b/testing/tests/regression-suite/2709b-REPORT-Event.result
@@ -0,0 +1,34 @@
+HTTP/1.1 207 Multi-Status
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+ETag: "a fine looking etag"
+Content-Length: xx
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+ /caldav.php/user1/past-and-future/2709-PUT-Event-99970820.ics
+
+
+ BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//artisanal-handcrafted-ICS.com//NONSGML Artisanal.iCal 1.0//EN
+BEGIN:VEVENT
+CLASS:PUBLIC
+DTSTAMP:xx
+DTSTART:99970820T000000Z
+DURATION:P1H
+SUMMARY:Test date in 99970820
+TRANSP:OPAQUE
+UID:2709-PUT-Event-99970820
+RRULE:FREQ=WEEKLY;COUNT=2
+END:VEVENT
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
diff --git a/testing/tests/regression-suite/2709b-REPORT-Event.test b/testing/tests/regression-suite/2709b-REPORT-Event.test
new file mode 100644
index 00000000..16ac4166
--- /dev/null
+++ b/testing/tests/regression-suite/2709b-REPORT-Event.test
@@ -0,0 +1,30 @@
+#
+# REPORT on event for 99970820, created by previous test.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/past-and-future/
+AUTH=user1:user1
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+REPLACE=/^ETag: "[0-9a-f]+"/ETag: "a fine looking etag"/
+REPLACE=/^DTSTAMP:\d+T\d+Z/DTSTAMP:xx/
+REPLACE=/^Content-Length: \d+/Content-Length: xx/
+
+BEGINDATA
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENDDATA
+
diff --git a/testing/tests/regression-suite/2709c-FREEBUSY-Event.result b/testing/tests/regression-suite/2709c-FREEBUSY-Event.result
new file mode 100644
index 00000000..83c79c6f
--- /dev/null
+++ b/testing/tests/regression-suite/2709c-FREEBUSY-Event.result
@@ -0,0 +1,19 @@
+HTTP/1.1 200 OK
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
+Content-Length: xx
+Content-Type: text/calendar;charset=UTF-8
+
+BEGIN:VCALENDAR
+PRODID:-//davical.org//NONSGML AWL Calendar//EN
+VERSION:2.0
+CALSCALE:GREGORIAN
+BEGIN:VFREEBUSY
+DTSTAMP:xx
+DTSTART:99970820T000000Z
+DTEND:xx
+FREEBUSY:99970820T000000Z/xx
+FREEBUSY:xx/xx
+END:VFREEBUSY
+END:VCALENDAR
diff --git a/testing/tests/regression-suite/2709c-FREEBUSY-Event.test b/testing/tests/regression-suite/2709c-FREEBUSY-Event.test
new file mode 100644
index 00000000..036fd53e
--- /dev/null
+++ b/testing/tests/regression-suite/2709c-FREEBUSY-Event.test
@@ -0,0 +1,26 @@
+#
+# Free/Busy should show two busy periods one that starts at the timestamp
+# and another a week later. I haven't added logic to the script which
+# generates this file to work out what those other dates are, so as long
+# as we have two busy periods, we'll call that done.
+#
+TYPE=REPORT
+URL=http://regression.host/caldav.php/user1/past-and-future/
+AUTH=user1:user1
+HEADER=Content-Type: text/xml; charset="UTF-8"
+HEADER=Depth: 0
+HEAD
+
+REPLACE=/^Content-Length: [0-9]+/Content-Length: xx/
+REPLACE=/^DTSTAMP:\d+T\d+Z/DTSTAMP:xx/
+REPLACE=/^DTEND:\d+T\d+Z/DTEND:xx/
+REPLACE=,^FREEBUSY:99970820T000000Z/\d+T\d+Z,FREEBUSY:99970820T000000Z/xx,
+REPLACE=,^FREEBUSY:(?!99970820T000000Z)\d+T\d+Z/\d+T\d+Z,FREEBUSY:xx/xx,
+
+BEGINDATA
+
+
+
+
+ENDDATA
+