From a318d0bb704699815f9c36273f730c7dc2e4c925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD=20=D0=9F=D0=B0=D0=BB=D0=B0?= =?UTF-8?q?=D1=83=D0=B7=D0=BE=D0=B2?= Date: Sun, 24 Oct 2021 20:30:58 +0300 Subject: [PATCH] I#1672 - ECalModel: Show DTSTAMP, when LAST-MODIFIED is missing ...and when applicable. See: https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.7.2 Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1672 --- src/calendar/gui/e-cal-model.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/calendar/gui/e-cal-model.c b/src/calendar/gui/e-cal-model.c index 0abb0b715a..21b898004e 100644 --- a/src/calendar/gui/e-cal-model.c +++ b/src/calendar/gui/e-cal-model.c @@ -1559,9 +1559,16 @@ cal_model_value_at (ETableModel *etm, model, comp_data, I_CAL_CREATED_PROPERTY, i_cal_property_get_created, &comp_data->created); case E_CAL_MODEL_FIELD_LASTMODIFIED : - return (gpointer) get_datetime_from_utc ( + { + gpointer result = (gpointer) get_datetime_from_utc ( model, comp_data, I_CAL_LASTMODIFIED_PROPERTY, i_cal_property_get_lastmodified, &comp_data->lastmodified); + if (!result && !e_cal_util_component_has_property (comp_data->icalcomp, I_CAL_METHOD_PROPERTY)) + return get_datetime_from_utc (model, comp_data, I_CAL_DTSTAMP_PROPERTY, i_cal_property_get_dtstamp, &comp_data->lastmodified); + + return result; + + } case E_CAL_MODEL_FIELD_HAS_ALARMS : return GINT_TO_POINTER (e_cal_util_component_has_alarms (comp_data->icalcomp)); case E_CAL_MODEL_FIELD_ICON :