This repository maintains timezone database files used by piCorePlayer to convert IANA/Olson timezone identifiers to Linux TZ format strings.
The timezones.db file is automatically updated from IANA timezone data via a GitHub Action workflow:
- Manual Trigger: The workflow can be manually triggered from the Actions tab
- Scheduled: Runs automatically every Monday at 00:00 UTC
- Branch: Updates are committed directly to the
gh-pagesbranch
update_timezones.py: Python script that downloads the latest IANA timezone data and generatestimezones.db.github/workflows/update-timezones.yml: GitHub Action workflow that runs the update scripttimezones.db: The generated timezone database (located ingh-pagesbranch)
- Downloads the latest timezone data from
https://data.iana.org/time-zones/releases/tzdata-latest.tar.gz - Checks the version of the downloaded data against the existing
timezones.dbfile - If the version is the same, exits early (no update needed)
- If the version is different, extracts and compiles the timezone files using the
zictool - Parses the compiled timezone files to extract Linux TZ format strings
- Generates
timezones.dbwith mappings from timezone names to TZ strings - Validates the generated file has the expected format and content
- Commits changes to the
gh-pagesbranch if the file has been updated
The timezones.db file contains:
- A header comment indicating the IANA tzdata version and build date
- One timezone per line in the format:
Timezone/Name TZ_STRING
Example:
# This file is based on iana.org tzdata 2025c built on 2025-12-19 00:35:20 UTC
Africa/Abidjan GMT0
Africa/Accra GMT0
America/New_York EST5EDT,M3.2.0,M11.1.0
The generated timezones.db file is hosted via GitHub Pages and accessed by the timezone-worker Cloudflare Worker to provide timezone conversions.