Simple array of timezones with their long name, tz code, and UTC offset.
Switch branches/tags
Nothing to show
Clone or download
Latest commit a2742dc Nov 13, 2018
Permalink
Failed to load latest commit information.
.gitignore add package Jun 13, 2018
LICENSE add package Jun 13, 2018
README.md update meta data and README Jun 14, 2018
index.js Change "Asia/Calcutta" to "Asia/Kolkata" Nov 13, 2018
package.json 1.0.6 Nov 13, 2018

README.md

compact-timezone-list

This package contains an array of timezones based on conventional options found online. It does not follow any complete data set, but all names are according to the tz format: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

More specifically, the fields in the array are:

  • offset, a string from "-11:00" to "+14:00" representing the UTC offset
  • label, a readable label that contains the offset and a longer, descriptive name of the timezone
  • tzCode, the value from the tz standard

Install

npm install compact-timezone-list --save
# or
yarn add compact-timezone-list

Example:

 import timezones from 'compact-timezone-list';
 // or
 import { minimalTimezoneSet } from 'compact-timezone-list';

Details

  • The default export provides a long list of options, with multiple suggestions for each UTC offset.
  • The minimalTimezoneSet export provides one option per offset type, with a favourite chosen to represent each offset. This is mostly targeted to small, western-focused apps. But, every UTC offset is included.