From 7bbf00855f2ca150c1913c65751bca3a88dbdda0 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Fri, 9 Oct 2026 19:57:07 +0200 Subject: [PATCH] events: Add DTSTAMP to ICS feed entries RFC 5545 requires DTSTAMP on every VEVENT. Use the page's last publish time so the value stays stable between downloads. --- mpicms/events/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mpicms/events/models.py b/mpicms/events/models.py index bc7fa3e..5f5fc1d 100644 --- a/mpicms/events/models.py +++ b/mpicms/events/models.py @@ -4,6 +4,7 @@ from django.db import models from django.core.exceptions import ValidationError +from django.utils import timezone from django.utils.translation import gettext_lazy as _ from wagtail.admin.panels import FieldPanel, MultiFieldPanel @@ -134,7 +135,9 @@ def get_ics(self, external=False): end=event.end, description=event.search_description, url=event.full_url, - location=event.room + location=event.room, + # ics 0.7 serializes "created" as DTSTAMP, which RFC 5545 requires. + created=event.last_published_at or event.latest_revision_created_at or timezone.now() ) if type(event.start) is date: e.make_all_day()