}
In this below script, Convert UTC Date Time to local/EST Hours
Type 1:
var localTime = new Date();
var localKolkata = moment.tz(localTime, "Asia/Kolkata").format("hh:mm:ss");
Javascript script provide date and time format.
Type 2:
function getLocalTime(i) {
if (typeof i !== 'number') return;
var d = new Date();
var len = d.getTime();
var offset = d.getTimezoneOffset() * 60000;
var utcTime = len + offset;
return new Date(utcTime + 3600000 * i);
}
#sharepoint #javascript #datetime #jquery #convertdatetime