Gathering detailed insights and metrics for @vvo/tzdb
Gathering detailed insights and metrics for @vvo/tzdb
Gathering detailed insights and metrics for @vvo/tzdb
Gathering detailed insights and metrics for @vvo/tzdb
🕰 Simplified, grouped and always up to date list of time zones, with major cities
npm install @vvo/tzdb
Typescript
Module System
Node Version
NPM Version
99.6
Supply Chain
99.6
Quality
94.9
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
18,720,643
Last Day
13,796
Last Week
204,916
Last Month
875,594
Last Year
7,985,762
MIT License
845 Stars
565 Commits
56 Forks
8 Watchers
17 Branches
12 Contributors
Updated on Jul 01, 2025
Minified
Minified + Gzipped
Latest Version
6.176.0
Package Id
@vvo/tzdb@6.176.0
Unpacked Size
170.88 kB
Size
37.22 kB
File Count
20
NPM Version
10.9.2
Node Version
22.16.0
Published on
Jun 27, 2025
Cumulative downloads
Total Downloads
Last Day
6.1%
13,796
Compared to previous day
Last Week
-0.1%
204,916
Compared to previous week
Last Month
1.2%
875,594
Compared to previous month
Last Year
61.3%
7,985,762
Compared to previous year
This is a list and npm package of:
Pacific Time
instead of America/Los_Angeles
, along with major cities for each time zone.The data and npm packages are automatically updated whenever there are changes to https://www.geonames.org/ which is generated from IANA databases.
This is useful whenever you want to build a time zone select menu in your application.
Installation:
1npm add @vvo/tzdb
Usage:
1import { getTimeZones, rawTimeZones, timeZonesNames, abbreviations } from "@vvo/tzdb";
1const timeZones = getTimeZones(); 2 3// You can also provide an optional parameter to include UTC in the result. 4// This adds a time zone with the name "UTC" and a fixed offset of 0. 5const timeZonesWithUtc = getTimeZones({ includeUtc: true });
This method returns an array of time zones objects:
1[ 2 // ... 3 { 4 name: "America/Los_Angeles", 5 alternativeName: "Pacific Time", 6 group: ["America/Los_Angeles"], 7 continentCode: "NA", 8 continentName: "North America", 9 countryName: "United States", 10 countryCode: "US", 11 mainCities: ["Los Angeles", "San Diego", "San Jose", "San Francisco"], 12 rawOffsetInMinutes: -480, 13 abbreviation: "PST", 14 rawFormat: "-08:00 Pacific Time - Los Angeles, San Diego, San Jose, San Francisco", 15 currentTimeOffsetInMinutes: -420, // "current" time zone offset, this is why getTimeZones() is a method and not just an object: it works at runtime 16 currentTimeFormat: "-07:00 Pacific Time - Los Angeles, San Diego", 17 }, 18 // ... 19];
When relevant, time zones are grouped. The rules for grouping are:
name
attribute), is always the one from the most populated cityHere's a grouping example:
1{ 2 name: "America/Dawson_Creek", 3 alternativeName: "Mountain Time", 4 group: ["America/Creston", "America/Dawson_Creek", "America/Fort_Nelson"], 5 continentCode: "NA", 6 continentName: "North America", 7 countryName: "Canada", 8 countryCode: "CA", 9 mainCities: ["Fort St. John", "Creston", "Fort Nelson"], 10 rawOffsetInMinutes: -420, 11 abbreviation: "MST", 12 rawFormat: "-07:00 Mountain Time - Fort St. John, Creston, Fort Nelson", 13 currentTimeOffsetInMinutes: -420, 14 currentTimeFormat: "-07:00 Mountain Time - Fort St. John, Creston" 15}
This is an array of time zone objects without the current time information:
1[ 2 // ... 3 { 4 name: "America/Los_Angeles", 5 alternativeName: "Pacific Time", 6 group: ["America/Los_Angeles"], 7 continentCode: "NA", 8 continentName: "North America", 9 countryName: "United States", 10 countryCode: "US", 11 mainCities: ["Los Angeles", "San Diego", "San Jose", "San Francisco"], 12 rawOffsetInMinutes: -480, 13 abbreviation: "PST", 14 rawFormat: "-08:00 Pacific Time - Los Angeles, San Diego, San Jose, San Francisco", 15 }, 16 // ... 17];
This is an array of time zone names:
1[ 2 // ... 3 "America/Juneau", 4 "America/Kentucky/Louisville", 5 "America/Kentucky/Monticello", 6 "America/Kralendijk", 7 "America/La_Paz", 8 "America/Lima", 9 "America/Los_Angeles", 10 "America/Lower_Princes", 11 "America/Maceio", 12 "America/Managua", 13 "America/Manaus", 14 "America/Marigot", 15 "America/Martinique", 16 "America/Matamoros", 17 // ... 18];
This is an object mapping timezone abbreviations to their full forms:
1{ 2 // ... 3 "Australian Central Daylight Time": "ACDT", 4 "Australian Central Standard Time": "ACST", 5 "Australian Central Time": "ACT", 6 "Australian Central Western Standard Time": "ACWST", 7 "Australian Eastern Daylight Time": "AEDT", 8 "Australian Eastern Standard Time": "AEST", 9 "Australian Eastern Time": "AET", 10 "Australian Western Daylight Time": "AWDT", 11 "Australian Western Standard Time": "AWST", 12 "Azerbaijan Summer Time": "AZST", 13 "Azerbaijan Time": "AZT", 14 "Azores Summer Time": "AZOST", 15 "Azores Time": "AZOT", 16 "Bangladesh Standard Time": "BST", 17 "Bhutan Time": "BTT", 18 "Bolivia Time": "BOT", 19 // ... 20};
Caution: Although abbreviations can be easy to lookup, they can be misleading. For example: CST can refer to Central Standard Time (-06.00 UTC), China Standard Time (+06.00 UTC) or Cuba Standard Time (-05.00 UTC). And abbreviation full forms don't directly map to any property in the time zone objects returned by rawTimeZones
or getTimeZones()
.
name
attribute (America/Los_Angeles
) in your database1const value = timeZones.find((timeZone) => { 2 return dbData.timeZone === timeZone.name || timeZone.group.includes(dbData.timeZone); 3});
No vulnerabilities found.
Reason
17 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
26 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More