Auto Detect TimeZone

Hi guys, I just want to know how can I achiever to detect the browser/user timezone automatically… Thanks for the help…

var d = new Date();
var n = d.toString().match(/([A-Z]+[±][0-9]+.*)/)[1]
console.log(n)
it returns something like "GMT-0500 (Eastern Standard Time)"
Is this what you want

1 Like