feat: Complete import functionality with RRULE fixes and comprehensive testing

- Fix RRULE BYDAY filtering for daily frequency events (Tether sync weekdays only)
- Fix timezone transfer in recurring event expansion
- Add comprehensive timezone-aware iCal generation
- Add extensive test suite for recurrence and timezone functionality
- Update dependencies and configuration examples
- Implement cleanup logic for orphaned events
- Add detailed import plan documentation

This completes the core import functionality with proper timezone handling,
RRULE parsing, and duplicate prevention mechanisms.
This commit is contained in:
Alvaro Soliverez 2025-11-21 12:04:46 -03:00
parent 932b6ae463
commit 640ae119d1
14 changed files with 3057 additions and 182 deletions

22
test_timezone.rs Normal file
View file

@ -0,0 +1,22 @@
use chrono::{DateTime, Utc, NaiveDateTime};
fn main() {
let start = DateTime::from_naive_utc_and_offset(
NaiveDateTime::parse_from_str("20231225T083000", "%Y%m%dT%H%M%S").unwrap(),
Utc
);
let end = start + chrono::Duration::minutes(30);
let mut event = caldav_sync::event::Event::new("Tether Sync".to_string(), start, end);
event.timezone = Some("America/Toronto".to_string());
let ical = event.to_ical().unwrap();
println!("=== Event with Timezone (America/Toronto) ===");
println!("{}", ical);
println!("\n");
let utc_event = caldav_sync::event::Event::new("UTC Event".to_string(), start, end);
let ical_utc = utc_event.to_ical().unwrap();
println!("=== Event without Timezone (fallback to UTC) ===");
println!("{}", ical_utc);
}