core: HomeAssistant does not understand X-WR-TIMEZONE

The problem

Background

Most iCalendar implementations use some extensions, such as the X-WR-* properties, which are extensively used by Google, Microsoft and others. The most important of these properties is X-WR-TIMEZONE, which is supported and used by Google, Apple, and Microsoft and defines an Olson time zone for “local” events in a calendar.

HomeAssistant currently does not support this time zone definition, and instead mistakenly throws a log error that there is no time zone specified.

Sample data:

BEGIN:VCALENDAR
PRODID:-//myicehockey//NONSGML v1.0//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:MIH Player
X-WR-CALDESC:MIH Player
X-WR-TIMEZONE:Europe/Zurich
BEGIN:VEVENT
ORGANIZER;CN=MIH:MAILTO:app-no-communication@myice.hockey
UID:PP621883
DTSTAMP:20250519T180000Z
CREATED:20250517T073125
LAST-MODIFIED:20250517T073125
DTSTART:20250519T180000
DTEND:20250519T193000
LOCATION:School sports facility, Zurich
SUMMARY:Off-Ice Training
TRANSP:TRANSPARENT
CATEGORIES:PRACTICES
CLASS:PUBLIC
END:VEVENT
BEGIN:VEVENT
ORGANIZER;CN=MIH:MAILTO:app-no-communication@myice.hockey
UID:PP622295
DTSTAMP:20250522T193000Z
CREATED:20250517T073125
LAST-MODIFIED:20250517T073125
DTSTART:20250522T193000
DTEND:20250522T203000
LOCATION:Ice Rink Zurich
SUMMARY:TRAINING
TRANSP:TRANSPARENT
CATEGORIES:PRACTICES
CLASS:PUBLIC
END:VEVENT

This can lead to issues of shifting calendar events when dealing with multiple time zones, e.g. while travelling, see https://github.com/home-assistant/core/issues/145087

Solution

  • Add support for X-WR-TIMEZONE

Perhaps https://pypi.org/project/x-wr-timezone/ can be of help?

Thoughts

It might also be useful to support X-WR-CALNAME and X-WR-CALDESC properties.

Not sure CATEGORIES is exposed as a property within HomeAssistant - did not get to that yet. But if it isn’t that might also be worthwhile as it would be useful for differentiating in rendering and automations.

What version of Home Assistant Core has the issue?

core-2025.5.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Remote Calendar

Link to integration documentation on our website

https://www.home-assistant.io/integrations/remote_calendar

Diagnostics information

No response

Example YAML snippet


Anything in the logs that might be useful for us?

Logger: homeassistant.components.remote_calendar.ics
Source: components/remote_calendar/ics.py:42
integration: Remote Calendar ([documentation](https://www.home-assistant.io/integrations/remote_calendar), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+remote_calendar%22))
First occurred: 09:13:58 (1 occurrence)
Last logged: 09:13:58

Error parsing calendar information: Failed to parse calendar TIMEZONE component: At least one standard or daylight definition is required

Additional information

No response

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 23 (9 by maintainers)

Most upvoted comments

Hi, we seem to be having a miscommunication here. I am talking specifically about this:

Error parsing calendar information: Failed to parse calendar TIMEZONE component: At least one standard or daylight definition is required

where a calendar can’t load. There have not been any details here about the source of malformed VTIMEZONZE. I am not asking about X-WR-TIMEZONE, addressed the stance on that above already.

Questions:

To be clear: I’ve added support to workaround Apple, Google, and Microsoft issues that are widespread. If you give me steps for how to reproduce this in those products i’ll be open to exploring it. How as a user do i get a calendar with a broken VTIMEZONE?

Comments:

  • Adding support for X-WR-TIMEZONE is a separate topic, and is a feature request to discuss in the community forums.
  • Even if you think VTIMEZONE is bad, thats fine, it can be improved with extensions on top of VTIMEZONE. What we’re talking about here is creating invalid timezone objects. You can still create valid timezone objects, or omit them, or whatever, and create extensions on top while still having the rest of the calendar be valid. You don’t need to update the RFC.

From https://blog.jonudell.net/2011/10/17/x-wr-timezone-considered-harmful/

Note that Google Calendar, the 800-pound gorilla in this space, is not one of those 70 producers. When it writes iCalendar format it uses both X-WR-TIMEZONE and VTIMEZONE; the latter ensures that Google Calendars can be understood properly by standard parsers that don’t support X-WR-TIMEZONE. The 100 producers I’m talking about, though, are using only X-WR-CALENDAR in a way that suggests they expect a nonstandard transformation. The fact that Google Calendar performs that transformation is, of course, a major reason why producers would expect it to happen everywhere.

This comment is highlighting my point: “invalid vtimezone” is a separate topic from “please support X-WR-TIMEZONE, it’s better”.

  • It is known that VTIMEZONE has issues, – and it is acknowleged in the spec that timezone rules can update by governing bodies over time. Not really new info here. (Aside: The main reason for exporting this has to do with recurring events and ensuring they are not ambiguous, so it needs to be fully specified.) But that is not really relevant to where we find ourselves here: remote_calendar queries the calendar every N minutes and the calendar provider can export a new version of the VTIMEZONE table any time it wants with the latest timezone.
  • We already fully support Olson timezone files and ignore VTIMEZONE when the name matches. We have mappings for linux timezones, windows timezones, and https://github.com/python/tzdata as a fallback if they aren’t present on the system. I agree with you this is the sane behavior which is the conclusion i came to myself as well. All calendaring systems need to effectively do this anyway to generate VTIMEZONE in the first place. (But this is independent from improperly implementing the spec.). This is an independent topic form correct VTIMEZONE output.
  • I’m not worried about doing extra work here. Building rfc5545 library from scratch is definitely not about saving time and effort 😃 … so not really moivated by using that library that depends on icalendar – we can do it more efficiently.