Registry / serialization / tzdata-etcetera

tzdata-etcetera

JSON →
library1.0.48jsnpmunverified

The `tzdata-etcetera` package provides a specific subset of the IANA Time Zone Database, focusing exclusively on the 'etcetera' zones such as Etc/GMT, Etc/UTC, and GMT. It delivers this data directly as a JSON file, intended for consumption by applications that require up-to-date time zone definitions without needing the entire global dataset. As of version 1.0.48, it incorporates the IANA TZ database release 2026a. The package maintains a regular release cadence, typically updating shortly after new IANA TZ database releases, which occur several times a year to reflect changes in time zone rules globally. This modular approach allows developers to include only the necessary time zone data, minimizing bundle size, and it is often used in conjunction with libraries like `timezonecomplete` for time zone calculations. Its primary differentiator is its granular focus on a specific zone category and its direct JSON output.

npm install tzdata-etcetera
INSTALL
IMPORT
SIG · TZDATA-ETCETERA
T
tzdata-etcetera
serializationjavascriptv1.0.48
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

tzdataEtcetera
var jsonData = require('tzdata-etcetera');
import jsonData from 'tzdata-etcetera';
The package primarily provides a CommonJS export of the JSON data. Direct ESM import might work in some bundlers or Node versions that support JSON modules, but `require` is the explicitly documented and most reliable method.
tzdataEtcetera (browser global)
<script src="./tzdata-etcetera.js"></script> <script> function onLoad() { var data = tzdataEtcetera; } </script>
When loaded directly in a browser via a script tag, the data is exposed as a global variable `tzdataEtcetera`.

Demonstrates how to import the 'etcetera' time zone data in Node.js and access specific zone definitions.

const tzdataEtcetera = require('tzdata-etcetera'); // Example: Accessing data for a specific zone const gmtPlus5Data = tzdataEtcetera['Etc/GMT+5']; if (gmtPlus5Data) { console.log('Etc/GMT+5 data:', gmtPlus5Data); console.log('Sample rule for Etc/GMT+5:', gmtPlus5Data[0]); } else { console.log('Etc/GMT+5 data not found.'); } // List all zones included in this package console.log('\nZones included in tzdata-etcetera:'); Object.keys(tzdataEtcetera).forEach(zone => { console.log(`- ${zone}`); });
Debug
Known issues
breakingThe underlying IANA Time Zone Database frequently updates time zone rules (e.g., daylight saving changes, standard time shifts, new zones). While the package API remains stable, the data itself changes, which can alter time calculations for affected regions.
fix
Regularly update the package to ensure the most current time zone data. Be aware that past time calculations might produce different results with newer data.
affects: >=1.0.0
breakingVersion 1.0.45 removed a 'null' timezone entry. Consumers explicitly relying on the presence or structure of a 'null' entry might experience breakage.
fix
Update application logic to no longer expect or handle a 'null' timezone entry. Verify any parsing or validation routines that might have relied on this specific entry.
affects: >=1.0.45
gotchaThis package exports raw JSON data, not a module with functions or classes. Attempting to destructure or call methods on the imported data will fail.
fix
Treat the imported value as a plain JavaScript object (from JSON). Access time zone data directly via property lookup, e.g., `tzdataEtcetera['Etc/GMT']`.
affects: >=1.0.0
Upgrade
Version history
1.0.48latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
20
Amazon
1
OpenAI (training)
1
Resources
tzdata-etcetera — npm install tzdata-etcetera · libregistry