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:
parent
932b6ae463
commit
640ae119d1
14 changed files with 3057 additions and 182 deletions
22
test_timezone.rs
Normal file
22
test_timezone.rs
Normal 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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue