How to use timezone offset in Nodejs?
Moment.js now has Moment Timezone
Install:
npm install --save moment-timezone
Use:
var Moment = require('moment-timezone');
Moment().tz('America/Los_Angeles').format();
You can use node-time, as follows:
var time = require('time');
var a = new time.Date(1337324400000);
a.setTimezone('Europe/Amsterdam');
console.log(a.toString()); // Fri May 18 2012 09:00:00 GMT+0200 (CEST)
a.setTimezone('Europe/Kiev');
console.log(a.toString()); // Fri May 18 2012 10:00:00 GMT+0300 (EEST)