{"id":20117882,"url":"https://github.com/add2cal/timezones-ical-library","last_synced_at":"2026-01-06T21:24:27.523Z","repository":{"id":57772100,"uuid":"527542504","full_name":"add2cal/timezones-ical-library","owner":"add2cal","description":"Easy direct access to the most recent official time zone information for iCalendar files via JavaScript.","archived":false,"fork":false,"pushed_at":"2025-05-30T01:16:46.000Z","size":6172,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-25T11:11:31.777Z","etag":null,"topics":["apple","builder","calendar","component","generator","google","iana","ical","icalendar","ics","javascript","microsoft","module","node","olson","outlook","package","react","timezone","vzic"],"latest_commit_sha":null,"homepage":"https://tz.add-to-calendar-technology.com","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/add2cal.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["jekuer"]}},"created_at":"2022-08-22T11:52:57.000Z","updated_at":"2025-06-19T08:50:58.000Z","dependencies_parsed_at":"2023-11-07T16:27:49.138Z","dependency_job_id":"4d5be7ac-3257-4b52-b20b-cd12323ed8fb","html_url":"https://github.com/add2cal/timezones-ical-library","commit_stats":{"total_commits":95,"total_committers":2,"mean_commits":47.5,"dds":"0.17894736842105263","last_synced_commit":"d44740dd870cf0ef18ac6d414a92be3bbb321a9f"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/add2cal/timezones-ical-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/add2cal%2Ftimezones-ical-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/add2cal%2Ftimezones-ical-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/add2cal%2Ftimezones-ical-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/add2cal%2Ftimezones-ical-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/add2cal","download_url":"https://codeload.github.com/add2cal/timezones-ical-library/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/add2cal%2Ftimezones-ical-library/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266456245,"owners_count":23931383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","builder","calendar","component","generator","google","iana","ical","icalendar","ics","javascript","microsoft","module","node","olson","outlook","package","react","timezone","vzic"],"created_at":"2024-11-13T19:08:43.677Z","updated_at":"2026-01-06T21:24:27.518Z","avatar_url":"https://github.com/add2cal.png","language":"C","funding_links":["https://github.com/sponsors/jekuer"],"categories":[],"sub_categories":[],"readme":"![Add to Calendar TimeZone iCal Library](https://github.com/add2cal/timezones-ical-library/blob/main/readme-header.png?raw=true)\n\n[![Codacy Grade](https://img.shields.io/codacy/grade/aa298c980fa4459a9f7a386c8f8dc35f?style=for-the-badge)](https://app.codacy.com/gh/add2cal/timezones-ical-library/dashboard)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/add2cal/timezones-ical-library/npm-publish.yml?style=for-the-badge)](https://github.com/add2cal/timezones-ical-library/actions/workflows/npm-publish.yml)\n[![npm Installations](https://img.shields.io/npm/dt/timezones-ical-library?label=npm%20Installations\u0026style=for-the-badge)](https://www.npmjs.com/package/timezones-ical-library)\n[![GitHub license](https://img.shields.io/github/license/add2cal/timezones-ical-library?style=for-the-badge)](https://github.com/add2cal/timezones-ical-library/blob/main/LICENSE)\n\n\u003cbr /\u003e\n\n# Add to Calendar TimeZones iCal Library\n\nThe tool to convert the [IANA (formerly Olson) time zone database files](http://www.iana.org/time-zones) into VTIMEZONE blocks, compatible with the iCalendar specification (RFC2445).\n\nIt is based on the awesome tool by Damon Chaplin ([github.com/libical/vzic](https://github.com/libical/vzic)), but only provides the VTIMEZONE part to easily put this into any other iCal generator (like the [add-to-calendar-button](https://github.com/add2cal/add-to-calendar-button)). It is built to be used standalone or as JavaScript module, hosted as npm package.\n\n\u003cbr /\u003e\u003cbr /\u003e\n\n---\n\n\u003cbr /\u003e\n\n## 📦 Installation / Setup\n\n### 0. Update it (not required)\n\n**This step is only relevant if you want to build the package and data on your own and from source!**\n_(Requires Node.js as well as Linux as operating system.)_\nRun ...\n\n```\nsudo sh update-tzdata.sh tzVersionNumber\n```\n\n... with _tzVersionNumber_ being the version of the [IANA time zone database](https://www.iana.org/time-zones) you want to use (e.g. sudo sh update-tzdata.sh 2025c).\n\n\u003cbr /\u003e\n\n### 1. Load it\n\nInstall the package via npm with:\n\n```\nnpm install timezones-ical-library\n```\n\nAfter the installation:\n\n- require the package (commonJS) or ...\n- import the module (ES) via `import { tzlib_get_ical_block, tzlib_get_offset, tzlib_get_timezones } from 'timezones-ical-library';`.\n\n\u003cbr /\u003e\n\n### 2. Use it\n\n#### A. Get time zones\n\nUse `tzlib_get_timezones()` to retrieve a list of all available time zone strings. You can pass `true` to retrieve a JSON formatted string instead of an array.\n\n#### B. Get the iCal time zone block\n\nUse the `tzlib_get_ical_block(tzName)` function to return the proper iCal VTIMEZONE block for a given time zone string (tzName). Again, pass `true` to retrieve a JSON formatted string instead of an array (not recommended).\n\nYou will receive an array, holding the VTIMEZONE block first, and the TZID line (additionally) second. The latter one is needed for any further time statement.\n\nInclude this into your further iCal data to come up with a complete ics file.\n\nA final constellation could look like this:\n\n```\nBEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-// github.com/add2cal/add-to-calendar-button //EN\nCALSCALE:GREGORIAN\n```\n\n```\nBEGIN:VTIMEZONE\nTZID:America/New_York\nLAST-MODIFIED:20220824T133813Z\nX-LIC-LOCATION:America/New_York\nBEGIN:DAYLIGHT\nTZNAME:EDT\nTZOFFSETFROM:-0500\nTZOFFSETTO:-0400\nDTSTART:19700308T020000\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU\nEND:DAYLIGHT\nBEGIN:STANDARD\nTZNAME:EST\nTZOFFSETFROM:-0400\nTZOFFSETTO:-0500\nDTSTART:19701101T020000\nRRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU\nEND:STANDARD\nEND:VTIMEZONE\n```\n\n```\nBEGIN:VEVENT\nUID:2022-08-30T19:29:38.618Z@add-to-calendar-button\nDTSTAMP:20230214T091500Z\nDTSTART;TZID=America/New_York:20230214T091500\nDTEND;TZID=America/New_York:20230218T223000\nSUMMARY:A sample event\nDESCRIPTION:Just some descriptive text...\nLOCATION:World Wide Web\nSTATUS:CONFIRMED\nLAST-MODIFIED:20220830T192938Z\nSEQUENCE:0\nEND:VEVENT\nEND:VCALENDAR\n```\n\n#### C. Get a specific offset\n\nUse `tzlib_get_offset(tzName, isoDate, isoTime)` to get specific offset (relative to UTC), based on a provided date and time.\n\nFor example, you can provide _tzName_ `'Europe/Berlin'`, _isoDate_ `'2023-05-23'`, and _isoTime_ `'15:45'` in order to retrieve the offset, which applies for this time zone at the 23rd of May in 2023 at exactly 15:45.\n\n\u003cbr /\u003e\u003cbr /\u003e\n\n---\n\n\u003cbr /\u003e\n\n## ⚙️ API\n\nInstead of using this code or the npm package, you could also make use of the free and open API.\n\n### Getting a list of all zone names\n\n```\nhttps://tz.add-to-calendar-technology.com/api/zones.json\n```\n\n### Getting the ics part of a respective zone\n\n```\nhttps://tz.add-to-calendar-technology.com/api/%zoneName%.ics\n```\n\nWith %zoneName% being your time zone. So, for New York, this would be [https://tz.add-to-calendar-technology.com/api/America/New_York.ics](https://tz.add-to-calendar-technology.com/api/America/New_York.ics).\n**This is case sensitive!**\n\n(Mind that this does not deliver a fully valid ics file, since it only contains the VTIMEZONE part. You will need to combine this with your other event information.)\n\n\u003cbr /\u003e\u003cbr /\u003e\n\n---\n\n\u003cbr /\u003e\n\n## 🙌 Contributing\n\nAnyone is welcome to contribute, but mind the [guidelines](.github/CONTRIBUTING.md):\n\n- [Bug reports](.github/CONTRIBUTING.md#bugs)\n- [Feature requests](.github/CONTRIBUTING.md#features)\n- [Pull requests](.github/CONTRIBUTING.md#pull-requests)\n\n\u003cbr /\u003e\n\n## 📃 Copyright and License\n\nCopyright (c) [Jens Kuerschner](https://jekuer.com).\n\nLicensed under [Apache-2.0](LICENSE).\n\n\u003cbr /\u003e\n\n## ⚡ Changelog (without minor changes and fixes)\n\n![npm version](https://img.shields.io/npm/v/timezones-ical-library?label=current%20version\u0026style=for-the-badge)\n\n- v1.11 : database update (2025c)\n- v1.10 : upgrading to latest vzic improvements\n- v1.9 : database update (2025b)\n- v1.8 : database update (2024a)\n- v1.7 : database update (2023c)\n- v1.6 : database update (2022g)\n- v1.5 : new dist structure\n- v1.4 : further minification via data mapping\n- v1.3 : bundle size optimization and API\n- v1.2 : providing tzblock as array with separate tzid\n- v1.1 : get-offset function\n- v1.0 : initial release\n\n---\n\n\u003cbr /\u003e\n\n## 💜 Kudos go to\n\n- The [\"Time Zone King\"](https://samueli.ucla.edu/time-zone-king-how-one-ucla-computer-scientist-keeps-digital-clocks-ticking/) [Paul Eggert](https://github.com/eggert) for optimizing time zones for the web, ...\n- as well as all the contributors at [the official tz repository](https://github.com/eggert/tz).\n- The awesome authors of zic and [vzic](https://github.com/libical/vzic/graphs/contributors); mainly Damon Chaplin, [Allen Winter](https://github.com/winterz), and [Ken Murchison](https://github.com/ksmurchison).\n- [Trevor Eyre](https://github.com/trevoreyre) for his smooth and beautiful [autocomplete script](https://github.com/trevoreyre/autocomplete).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadd2cal%2Ftimezones-ical-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadd2cal%2Ftimezones-ical-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadd2cal%2Ftimezones-ical-library/lists"}