var moment require moment-timezone var convertDate function date var o

1
2
3
4
5
6
7
8
9
var moment = require('moment-timezone');
var convertDate = function(date){
var offset = moment(date).zone();
var mdate = moment(date).utc().add(-offset, 'minutes');
return mdate._d;
};
module.exports = convertDate;