djbrown / spielerplus-calendar

1 stars 1 forks source link

Add Time Zone Information to Event Datetimes #5

Closed djbrown closed 1 year ago

djbrown commented 1 year ago

Problem

When importing/subscribing in Microsoft Outlook, it complains about "floating" (non-time-zone-specific) date time values:

Task 'Internet Calendar Subscriptions' reported error (0x00040023) : 'The VEVENT, "Practice", defined near line 9, contains a floating DTSTART. Outlook supports floating time for all-day events only.
Task 'Internet Calendar Subscriptions' reported error (0x00040020) : 'The VEVENT, "Practice", defined near line 9, contains a floating DTEND. Outlook supports floating time for all-day events only.
iCalendar Data ```ical BEGIN:VCALENDAR VERSION:2.0 PRODID:-//SpielerPlus//Terminkalender 1.0//DE CALSCALE:GREGORIAN METHOD:PUBLISH X-WR-CALDESC:SpielerPlus Termine "Team-Name" X-WR-CALNAME:SpielerPlus Team-Name X-WR-TIMEZONE:Europe/Berlin BEGIN:VEVENT SUMMARY:Practice DTSTART;VALUE=DATE-TIME:20230707T190000 DTEND;VALUE=DATE-TIME:20230707T210000 DTSTAMP;VALUE=DATE-TIME:20230707T161459Z UID:event-training-123456 DESCRIPTION:http://spielerplus-server.tld/training/view?id=123456 END:VEVENT END:VCALENDAR ```

The icalendar spec also sais, that floating datetimes should be avoided (see RFC 5545 - 3.3.5. Date-Time).

Solution

Set timezone to Europe/Berlin on the server.