See the timezone package in npm. It has everything you need, built-in and pure JS, and apparently this is the best time zone processing library.
https://www.npmjs.com/package/timezone
http://bigeasy.imtqy.com/timezone/
var tz = require('timezone/loaded'), equal = require('assert').equal, utc; // Get POSIX time in UTC. utc = tz('2012-01-01'); // Convert UTC time to local time in a localize language. equal(tz(utc, '%c', 'fr_FR', 'America/Montreal'), 'sam. 31 déc. 2011 19:00:00 EST');
- Timezone is MicroJS library in pure JavaScript with no dependencies, which provides a mathematical date and time formatting for time dates.
- The time zone uses the IANA database to determine the correct time for the wall clock anywhere in the world at any time from the start of the standard time.
- Timezone date formats with full implementation of strftime formats, including GNU date extensions.
- The time zone represents time in POSIX and local time using RFC 3999 date strings.
- Timezone is a fully-featured standards-based time library in pure JavaScript for less than 3,000 minified and gzipped.
Samuel Neff Mar 08 '15 at 19:23 2015-03-08 19:23
source share