Closed paramazo closed 1 month ago
If I remember correct, the CalDAV search API only allows timestamps to be passed in the range, not dates. The RFC is quite elaborately explaining what events/tasks/journals should and should not be returned dependent on the range given - however, real-world server implementations may differ. Timezones on the events in the calendar may also differ. I think the best workaround here is to search from 2024-08-26 00:00:00 to 2024-08-27 00:00:00 and then do filtering on the client side to get out exactly what you want.
I'm fairly flexible, so I was to suggest to make it a feature, allow passing a date to the search-method, convert it to timestamps in the python library, and then, if needed, do extra filtering on the library side ... but then again, it's a rabbit hole once you start thinking about all the corner cases (including exotic time zones) and try specifying which ones should be included and which ones should be filtered away/
For the search, the client side filtering will work for me. To save event as all day event, the save_event does support date format. I can save an all day event with dtstart=2024-08-26, dtend=2024-08-27.
If i try to search for all day events (dtstart and dtend are the same, i.e. 2024-08-26 00:00:00 - 2024-08-26 00:00:00), a ReportError gets thrown.
Whats the best way to search for all day events? The date object seems not supported here.