Fix timezone handling and update detection

- Fix timezone preservation in to_ical_simple() for import module
- Add timezone comparison to needs_update() method to detect timezone differences
- Add comprehensive test for timezone comparison logic
- Log Bug #3: recurring event end detection issue for future investigation
This commit is contained in:
Alvaro Soliverez 2025-11-21 11:56:27 -03:00
parent f84ce62f73
commit 932b6ae463
5 changed files with 1178 additions and 132 deletions

29
TODO.md Normal file
View file

@ -0,0 +1,29 @@
# TODO - CalDAV Sync Tool
## 🐛 Known Issues
### Bug #3: Recurring Event End Detection
**Status**: Identified
**Priority**: Medium
**Description**: System not properly handling when recurring events have ended, causing duplicates in target calendar
**Issue**: When recurring events have ended (passed their UNTIL date or COUNT limit), the system may still be creating occurrences or not properly cleaning up old occurrences, leading to duplicate events in the target calendar.
**Files to investigate**:
- `src/event.rs` - `expand_occurrences()` method
- `src/nextcloud_import.rs` - import and cleanup logic
- Date range calculations for event fetching
## ✅ Completed
- [x] Fix timezone preservation in expanded recurring events
- [x] Fix timezone-aware iCal generation for import module
- [x] Fix timezone comparison in `needs_update()` method
- [x] Fix RRULE BYDAY filtering for daily frequency events
## 🔧 Future Tasks
- [ ] Investigate other timezone issues if they exist
- [ ] Cleanup debug logging
- [ ] Add comprehensive tests for timezone handling
- [ ] Consider adding timezone conversion utilities