Home

Awesome

IANA Tz Data

Unofficial JSON distribution of zdumped IANA timezone data.

It should be noted that a tabular text file (not JSON) is the "official" format for the IANA timezone data. The JSON data contained in this package is provided as a convenience for the development community, and is programatically generated from the corresponding text files using the JSON conversion utility provided here.

Goals

What's not included

No code other than the conversion utility is included.

The official data has additional information and has a different structure than what's distributed here. The official data has Zones and Rules

What's included

A JSON representation of the timezone transitions (actually, the output of zdump -v) for every timezone ids, which is what moment-timezone, globalize, and perhaps other JavaScript library use to calculate a date in a specific timezone ids. The structure looks like the below.

{
  "zoneData": {
    ...
    "America": {
      ...
      "New_York": {
        abbrs: [],
        untils: [],
        offsets: [],
        isdsts: []
      }
      ...
    }
  }
}

Status

Latest official release is version 2019c, published on 2019-09-11.

Usage

Installation using NPM:

npm install --save iana-tz-data

We follow a semver corresponding version based on the official version. The major version corresponds to the year and the minor corresponds to the letter. The patch version is independent and used for any necessary package fixes.

Official versionOur corresponding semver version
2019c2019.2
2019b2019.1
2018i2018.8
2018g2018.6
2018f2018.5
2018e2018.4
2018d2018.3
2018c2018.2
2018b2018.1
2017c2017.2
2017b2017.1
2017a2017.0

On your application, you can access IANA timezone JSON data by importing the "iana-tz-data" module.

import IANATimezoneData from "iana-tz-data";

License

MIT © Rafael Xavier de Souza