is it possible to get the current time by providing timezone in javascript?
Here I have-
timezone - America/Detroit
var d = new Date();
is it possible to get current time by providing America/Detroit ?
is it possible to get the current time by providing timezone in javascript?
Here I have-
timezone - America/Detroit
var d = new Date();
is it possible to get current time by providing America/Detroit ?
let date = new Date;
let strTime = date.toLocaleString("en-US", { timeZone: 'America/Detroit' }); console.log(timeZone, strTime);