A native solution:
var zone = new Date().toLocaleTimeString('en-us',{timeZoneName:'short'}).split(' ')[2]
console.log(zone)
You can pass undefined
instead of en-us
to default to the browser’s current locale.
A native solution:
var zone = new Date().toLocaleTimeString('en-us',{timeZoneName:'short'}).split(' ')[2]
console.log(zone)
You can pass undefined
instead of en-us
to default to the browser’s current locale.