The getTimeZones()
method of Intl.Locale
instances returns a list of supported time zones for this locale.
Note: In some versions of some browsers, this method was implemented as an accessor property called timeZones
. However, because it returns a new array on each access, it is now implemented as a method to prevent the situation of locale.timeZones === locale.timeZones
returning false
. Check the browser compatibility table for details.