Detect timezone abbreviation using JavaScript

A native solution:

var zone = new Date().toLocaleTimeString('en-us',{timeZoneName:'short'}).split(' ')[2]
console.log(zone)

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString

You can pass undefined instead of en-us to default to the browser’s current locale.

Leave a Comment