Timezone info missing in ICS files (wrong event time when imported to calender)

(Sorry about this nitpick!)

I noticed that while the forum nicely shows an event’s time on my timezone (see below for this page)

but when I export the .ics file from triple dot menu, there is no timezone info in the file, and when I import it in my Outlook calender, the event is shown starting at 18:00 (in my/Helsinki TZ case):

It seems that .ics files support some TZ information: https://stackoverflow.com/a/35649729/19835364

Maybe some one could check if the TZ info could be inserted to the .ics files that users export from this forum?

Thanks for the report, @juhoinkinen . I can reproduce the problem.

In the calendar entry itself, the timezone is indicated:

[event start="2025-11-17 17:00" status="public" timezone="UTC" end="2025-11-17 21:00" reminders="notification.1.days,notification.15.minutes"]
[/event]

As you say, in the HTML view, the date is correctly shown according to one’s time zone as indicated by the browser but apparently this time zone information is not included in the exported .ics file:

VERSION:2.0
PRODID:-//Discourse//EN
BEGIN:VEVENT
UID:1763398800000_1763413200000
DTSTAMP:20250918T130509Z
DTSTART:20251117T170000Z
DTEND:20251117T210000Z
DESCRIPTION:https://forum.swib.org/t/introduction-to-the-annif-automated-indexing-tool/1456/1
SUMMARY:🔨 Introduction to the Annif automated indexing tool
END:VEVENT
END:VCALENDAR

Somebody has reported this at Calendar: ICS file missing timezone info! - Bug - Discourse Meta in May 2024 but nothing has happened since.

I am not sure whether we can (or should) do anything about it on our own.

Assuming this can not be fixed, I guess it would be better to deactivate the “Add to calendar” function completely so that people do not export events with incorrect time, right? However, I do not see that we can deactivate it. @phu do you have an idea?

P.S.: Would it be ok for you to move this topc to the – publicly viewable – category Feedback > Site Feedback as this is a general problem with the SWIB Discourse forum?

1 Like

Yes, deactivating “Add to calender” sounds good in this case.

The “Add to calendar” menu item is now hidden via custom CSS.

2 Likes

It looks like the event information and the .ics export are correct: 17h UTC is exported as DTSTART:20251117T170000Z – where Z means UTC. 17h UTC is 18h in Central European Time.

Edit: I understand now that Helsinki is in a different time zone. That Outlook imports the event as starting at 18h local time, looks like a bug in Microsoft Outlook. (Of course this doesn’t help your situation.)

1 Like