This package provides a machine-readable JSON representation of the 'northamerica' region from the official IANA Time Zone Database (TZDB). It is a pure data package, offering a static snapshot of time zone rules and historical offsets specific to North American regions, intended for consumption by time zone calculation libraries rather than performing computations itself. The current stable version, 1.0.48, reflects the IANA TZDB 2026a release. The package follows the IANA TZDB release cadence, typically updating several times a year to incorporate geopolitical changes to time zones (e.g., changes in DST rules, country-wide offset shifts). Its key differentiator among similar data packages is its focus on a specific geographical subset, leading to a smaller footprint for applications that only require North American time zone data, and its direct JSON format which is easy to parse.
npm install tzdata-northamericaVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import and access time zone data for North American zones in a Node.js environment. It shows how to retrieve the raw JSON data for specific zones like 'America/New_York' and 'America/Los_Angeles', and illustrates that non-North American zones will not be present in this package. It also hints at how this data would be integrated with a time zone calculation library.
Always use the latest version of `tzdata-northamerica` to ensure the most accurate and up-to-date time zone information. Be aware that time zone calculations using previous versions of the data may yield different results. Regularly review IANA TZDB release notes for significant changes.
If your application requires global time zone data, you should install the main `tzdata` package or combine specific regional packages like `tzdata-europe`, `tzdata-asia`, etc., as needed. Do not assume `tzdata-northamerica` provides comprehensive global coverage.
You must use this data in conjunction with a dedicated time zone library (e.g., `timezonecomplete`, `luxon`, `moment-timezone`) that can interpret the IANA TZDB format and perform date/time manipulations. This package is solely a data source for such libraries.
Ensure `import jsonData from 'tzdata-northamerica';` or `const jsonData = require('tzdata-northamerica');` is correctly executed and that `jsonData` holds the expected object. Verify the time zone string (e.g., 'America/New_York') is spelled correctly and is part of the North American dataset.Ensure the `<script src="./node_modules/tzdata-northamerica/tzdata-northamerica.js"></script>` tag is present in your HTML *before* the script that tries to access `tzdataNorthamerica`. Check the file path to ensure it points to the correct location of the UMD bundle.
This package only contains IANA zones from North America. If you need data for other regions, use the main `tzdata` package or other regional `tzdata-*` packages (e.g., `tzdata-europe`).
No dependency data recorded yet.