I've got two nextcloud servers. In a python query I can query events for a time span. The query itself is successful. But the found events are strange. There are some results way out of the time span. The query data is:
<c:calendar-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav"> <d:prop><d:getetag /><c:calendar-data /></d:prop> <c:filter> <c:comp-filter name="VCALENDAR"> <c:comp-filter name="VEVENT"> <c:time-range start="20250911T000000" end="20250919T000000"/> </c:comp-filter> </c:comp-filter> </c:filter> </c:calendar-query> The request is made by:
requests.request( "REPORT", "https://my.nextcloud.de/remote.php/dav/calendars/myUser/myCalendar/", headers={"Depth": "1", "Content-Type": "text/html"}, auth=HTTPBasicAuth(reqName, reqPwd), data=reqData ) This gives a long list of calDAV data with events from 2024 for example. These are repeating events. I can epand this (thanks Gicu Aftene for the hint!), but now the times are missing time zone shift.
<c:calendar-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav"> <d:prop> <c:calendar-data> <c:expand start="20250907T000000" end="20250908T000000"/> </c:calendar-data> </d:prop> <c:filter> <c:comp-filter name="VCALENDAR"> <c:comp-filter name="VEVENT"> <c:time-range start="20250907T000000" end="20250908T000000"/> </c:comp-filter> </c:comp-filter> </c:filter> </c:calendar-query>' And the results changed their line endings with a coded return character in addition to a real return character (after the colon, as expected):
DTSTART:20250907T140000Z
firstoccurrenceandlastoccurrence) that not necessarily match the start and end (or duration) defined into related Calendar Object. What kind of CalDAV server you have? A custom made or something published? Because this sounds more a CalDAV server problem than a client query. Maybe something doesn't work properly during inserts or updatesRRULE:FREQ=DAYLY, that is present into calendar object data definition. Some times this operation is calledexpand