<img src="http://farm4.staticflickr.com/3605/3553572933_5d30ced3e7_b.jpg" alt="Sundial">
Format time in JavaScript using the IANA time zone database. (Photo: Sundial by Wolfgang Staudt.)
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');
A full-featured time zone aware date formatter for JavaScript.
strftime
formats,
including the GNU date
extensions.$ git clone --quiet https://github.com/bigeasy/timezone.git
$ cd timezone && make && npm install && npm test
The MIT License.