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.
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-timezoneuv
uv add x-wr-timezonepoetry
poetry add x-wr-timezoneInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
icalendarParses, creates, and modifies iCalendar files…
permissive · top 5,000 on PyPI
icsReads and writes iCalendar (RFC 5545) files in…
permissive · top 15,000 on PyPI
icalParse, create, and iterate over iCalendar (RFC…
permissive · top 15,000 on PyPI
cftimeConverts between calendar dates and numeric…
permissive · top 5,000 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
strict-rfc3339Converts Unix timestamps to and from RFC3339…
copyleft · top 5,000 on PyPI
pyCalverterConverts between different calendar systems,…
copyleft · top 15,000 on PyPI
recurring-ical-eventsExpands recurring iCalendar events (RFC 5545)…
copyleft · top 5,000 on PyPI
tzlocalReturns the IANA timezone name and tzinfo…
permissive · top 1,000 on PyPI
pytzpytz brings the Olson timezone database into…
permissive · top 100 on PyPI