A library to obtain the list of time zones.
// npm install
npm install @dacoto/timezone.js
// yarn install
npm add @dacoto/timezone.js
import Timezone from '@dacoto/timezone.js';
or
<script src="dist/timezone.js"></script>
- List time zones
Timezone.getAll(); // {"Pacific/Niue":"(GMT-11:00) Niue","Pacific/Pago_Pago":"(GMT-11:00 ...
- Get time zone name
Timezone.getTimezone('Europe/Madrid'); // (GMT+01:00) Madrid
MIT