From ac7d6952ebbb0bf7615bd65c479c43cefba4a777 Mon Sep 17 00:00:00 2001 From: daladim Date: Sun, 19 Dec 2021 18:51:50 +0100 Subject: [PATCH] Better support for iCal DTSTAMP/LAST-MODIFIED --- src/ical/parser.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ical/parser.rs b/src/ical/parser.rs index 3bdeadd..027337f 100644 --- a/src/ical/parser.rs +++ b/src/ical/parser.rs @@ -50,8 +50,17 @@ pub fn parse(content: &str, item_url: Url, sync_status: SyncStatus) -> Result { + // The property can be specified once, but is not mandatory + // "This property specifies the date and time that the information associated with + // the calendar component was last revised in the calendar store." + // In practise, for VEVENT and VTODO, this is generally the same value as DTSTAMP. + last_modified = parse_date_time_from_property(&prop.value); + } "COMPLETED" => { // The property can be specified once, but is not mandatory // "This property defines the date and time that a to-do was