get locale timezone javascript code example
Example 1: client timezone offset in JavaScript
var clientTimezoneOffset = new Date().getTimezoneOffset()/60;//offset in hours
Example 2: time zone browser javascript
fetch("https://worldtimeapi.org/api/ip")
.then(response => response.json())
.then(data => console.log(data.timezone,data.datetime,data.dst));