Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jazzpi/timezone-abbr-offsets
Timezone abbreviations mapped to offsets from UTC in minutes
https://github.com/jazzpi/timezone-abbr-offsets
Last synced: 11 days ago
JSON representation
Timezone abbreviations mapped to offsets from UTC in minutes
- Host: GitHub
- URL: https://github.com/jazzpi/timezone-abbr-offsets
- Owner: jazzpi
- Created: 2015-05-27T12:44:04.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-08T20:08:47.000Z (over 9 years ago)
- Last Synced: 2024-10-04T10:45:49.379Z (about 1 month ago)
- Homepage: https://www.npmjs.com/package/timezone-abbr-offsets
- Size: 141 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# timezone-abbr-offsets
Timezone abbreviations mapped to offsets from UTC in minutes. May return unexpected results for ambiguous abbreviations.
## Example
```js
var timezones = require('timezone-abbr-offsets')
console.log(timezones.CEST) // -> 120
console.log(timezones.UYST) // -> -120
console.log(timezones.X) // -> -660
```## Explanation
This is a simple object with the timezone abbreviations from [Wikipedia](http://en.wikipedia.org/wiki/List_of_time_zone_abbreviations)1 and one-character military timezones from http://timeanddate.com. When timezone abbreviations are ambiguous, the timezone that had more searches on Google Trends is used (like [this](http://www.google.com/trends/explore#q=bangladesh%20standard%20time%2C%20bougainville%20standard%20time%2C%20british%20summer%20time&cmpt=q&tz=)). There were two cases where Google Trends couldn't help:
- CST: Stands for Central Standard Time in Australia and North America. This is mapped to UTC-06:00 (i.e. `-360`)
- LHST: Stands for Lord Howe Standard Time and Lord Howe Summer Time. Google Trends didn't have enough search volume to make a comparison, so this is mapped to UTC+10:30 (i.e. `630`)- - -
1 Accesed on 2015-05-27 12:45 UTC