skillfed

x-wr-timezone

Repair Google Calendar - This Python module and program makes ICS/iCalendar files using X-WR-TIMEZONE compatible with the RFC 5545 standard.

x-wr-timezone v2.0.1 2.1M downloads/30d#3,324 on PyPI6
Copyleft license LGPL-3.0-or-later Active released

What it is and what it does

X-WR-TIMEZONE is a Python module that solves a compatibility problem in calendar files. Some calendar creators, notably Google Calendar, add a non-standard X-WR-TIMEZONE parameter to ICS files to specify the timezone for events. However, strict RFC 5545 parsers ignore this parameter, causing events to display at incorrect times when imported into standards-compliant calendar applications. This module bridges that gap by converting calendars using X-WR-TIMEZONE into proper RFC 5545-compliant calendars where timezone information is correctly embedded.

The package works both as a Python library and as a command-line tool. As a library, you pass an icalendar.Calendar object to the to_standard() function, which returns a converted calendar without modifying the original. The function is idempotent—passing a calendar through it twice produces no further changes. The command-line interface accepts calendar files via stdin or as arguments, making it easy to pipe output from wget or curl directly into the converter.

Use it for:

  • Convert Google Calendar exports to RFC 5545 compliance before importing into strict calendar applications
  • Standardize calendar files in a build pipeline to ensure consistent timezone handling across different calendar clients
  • Process calendar feeds from third-party sources that use X-WR-TIMEZONE via curl or wget piping
  • Repair timezone display issues when importing calendars into applications that don't recognize X-WR-TIMEZONE
  • Batch-convert a directory of calendar files to ensure they work correctly with standards-compliant tools

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Converts ICS calendar files that use the non-standard X-WR-TIMEZONE parameter to strict RFC 5545-compliant calendars, and provides both a Python API and command-line tool for this conversion.

Yes. The package solves a real, specific problem with minimal dependencies and no security vulnerabilities. It is actively maintained, has a stable API, and works as both a library and CLI tool. The copyleft license is standard for calendar software and poses no barrier for most use cases. Install it if you need to work with calendar files that use X-WR-TIMEZONE.

Install

x-wr-timezone on PyPI

pip

pip install x-wr-timezone

uv

uv add x-wr-timezone

poetry

poetry add x-wr-timezone

Installing x-wr-timezone

Before you install

Low friction: pure Python wheel with three lightweight runtime dependencies (icalendar, tzdata, click). Actively maintained with a recent release and no known vulnerabilities.

License in practice

Licensed under LGPL-3.0-or-later (copyleft). You may use and modify the package freely, but any derivative work must also be released under a compatible copyleft license.

Quickstart

pip install x-wr-timezone

import icalendar
import x_wr_timezone

with open('in.ics', 'rb') as f:
    calendar = icalendar.from_ical(f.read())
standardized = x_wr_timezone.to_standard(calendar)
with open('out.ics', 'wb') as f:
    f.write(standardized.to_ical())

Verify before relying

  • Whether the package handles all edge cases in real-world calendar files beyond the documented DTSTART, DTEND, EXDATE, RDATE properties

Package facts

License LGPL-3.0-or-later (copyleft)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 3 — icalendar, tzdata, click
Maintenance actively maintained — 554 days since the last release
Last repo commit
First released
Downloads 2,070,212/month — #3,324 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: x_wr_timezone-2.0.1-py3-none-any.whl

Keywords: icalendar

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)Natural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

Tags

icalendar timezone conversionx-wr-timezone rfc 5545google calendar ics standardizationicalendar x-wr-timezonecalendar file timezone repairics rfc compliancecalendar timezone normalization
calendar-processingrfc-compliance

More Python Modules packages