diff options
-rw-r--r-- | feeds.py | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -21,6 +21,7 @@ from django.db.models.functions import ExtractWeek, ExtractYear from django.template import loader from django.urls import reverse from django.utils.feedgenerator import Atom1Feed, SyndicationFeed +from django.utils.timezone import localtime from icalendar import Calendar, Event @@ -85,9 +86,9 @@ class IcalFeed(Feed): def item_extra_kwargs(self, item): return {"uid": "{0}@celcatsanitizer".format(item.id), - "dtstart": item.begin, - "dtend": item.end, - "dtstamp": item.last_update, + "dtstart": localtime(item.begin), + "dtend": localtime(item.end), + "dtstamp": localtime(item.last_update), "summary": self.item_summary(item), "location": format_rooms(item.rooms.all())} |