1.2.0 • Published 7 years ago

timezone-offsets v1.2.0

Weekly downloads
35
License
ISC
Repository
github
Last release
7 years ago

timezone-offset

Timezone list with adjusted time offset.

npm install timezone-offsets

Usage

The constructor returns a list of timezones. The time offset is based on the provided date (can ba a Date instance or a number).

var tz = require('timezone-offsets')

var timezones = tz(new Date('2016-01-01'))
console.log(timezones)

The objects in the returned array look like the following.

{
  name: 'Pacific/Tongatapu',
  countryCode: 'TO',
  offset: 46800000,             // Offset from UTC in milliseconds
  abbreviation: '+13',
  daylightSavingsTime: false
}