caldav: Add calendar-timezone-id

This commit is contained in:
Lennart
2025-01-04 16:48:15 +01:00
parent d1350af269
commit 5738f56dfe
13 changed files with 74 additions and 37 deletions

View File

@@ -11,6 +11,7 @@ pub struct Calendar {
pub description: Option<String>,
pub color: Option<String>,
pub timezone: Option<String>,
pub timezone_id: Option<String>,
pub deleted_at: Option<NaiveDateTime>,
pub synctoken: i64,
pub subscription_url: Option<String>,

View File

@@ -16,7 +16,6 @@ pub struct EventObject {
impl EventObject {
pub fn get_first_occurence(&self) -> Result<Option<CalDateTime>, Error> {
// This is safe since we enforce the event's existance in the constructor
if let Some(dtstart) = self.event.get_property("DTSTART") {
CalDateTime::parse_prop(dtstart, &self.timezones)
} else {
@@ -25,7 +24,6 @@ impl EventObject {
}
pub fn get_last_occurence(&self) -> Result<Option<CalDateTime>, Error> {
// This is safe since we enforce the event's existence in the constructor
if let Some(_rrule) = self.event.get_property("RRULE") {
// TODO: understand recurrence rules
return Ok(None);