Using an offset to calculate Timezone is a wrong approach, and you will always encounter problems. Time zones and daylight saving rules may change on several occasions during a year, and It's difficult to keep up with changes.

To get the system's IANA timezone in JavaScript, you should use

console.log(Intl.DateTimeFormat().resolvedOptions().timeZone)

As of April 2023, this works in 95.42% of the browsers used globally.

Old compatibility information

ecma-402/1.0 says that timeZone may be undefined if not provided to constructor. However, future draft (3.0) fixed that issue by changing to system default timezone.

In this version of the ECMAScript Internationalization API, the timeZone property will remain undefined if no timeZone property was provided in the options object provided to the Intl.DateTimeFormat constructor. However, applications should not rely on this, as future versions may return a String value identifying the host environment’s current time zone instead.

in ecma-402/3.0 which is still in a draft it changed to

In this version of the ECMAScript 2015 Internationalization API, the timeZone property will be the name of the default time zone if no timeZone property was provided in the options object provided to the Intl.DateTimeFormat constructor. The previous version left the timeZone property undefined in this case.

Answer from PD81 on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Date › getTimezoneOffset
Date.prototype.getTimezoneOffset() - JavaScript | MDN
In regions that use DST, the return value may change based on the time of the year date is in. Below is the output in a runtime in New York, where the timezone is UTC-05:00. js · const nyOffsetSummer = new Date("2022-02-01").getTimezoneOffset(); // 300 const nyOffsetWinter = new Date("2022-08-01").getTimezoneOffset(); // 240 ·
Top answer
1 of 16
1335

Using an offset to calculate Timezone is a wrong approach, and you will always encounter problems. Time zones and daylight saving rules may change on several occasions during a year, and It's difficult to keep up with changes.

To get the system's IANA timezone in JavaScript, you should use

console.log(Intl.DateTimeFormat().resolvedOptions().timeZone)

As of April 2023, this works in 95.42% of the browsers used globally.

Old compatibility information

ecma-402/1.0 says that timeZone may be undefined if not provided to constructor. However, future draft (3.0) fixed that issue by changing to system default timezone.

In this version of the ECMAScript Internationalization API, the timeZone property will remain undefined if no timeZone property was provided in the options object provided to the Intl.DateTimeFormat constructor. However, applications should not rely on this, as future versions may return a String value identifying the host environment’s current time zone instead.

in ecma-402/3.0 which is still in a draft it changed to

In this version of the ECMAScript 2015 Internationalization API, the timeZone property will be the name of the default time zone if no timeZone property was provided in the options object provided to the Intl.DateTimeFormat constructor. The previous version left the timeZone property undefined in this case.

2 of 16
789

Using getTimezoneOffset()

You can get the time zone offset in minutes like this:

var offset = new Date().getTimezoneOffset();
console.log(offset);
// if offset equals -60 then the time zone offset is UTC+01

The time-zone offset is the difference, in minutes, between UTC and local time. Note that this means that the offset is positive if the local timezone is behind UTC and negative if it is ahead. For example, if your time zone is UTC+10 (Australian Eastern Standard Time), -600 will be returned. Daylight savings time prevents this value from being a constant even for a given locale

  • Mozilla Date Object reference

Note that not all timezones are offset by whole hours: for example, Newfoundland is UTC minus 3h 30m (leaving Daylight Saving Time out of the equation).

Please also note that this only gives you the time zone offset (eg: UTC+01), it does not give you the time zone (eg: Europe/London).

Discussions

How to get the timezone from the browser (client side) | OutSystems
How to get the timezone from the browser (client side) More on outsystems.com
🌐 outsystems.com
July 29, 2015
How to get only the timeZone name in JavaScript?
The intent of the methods you are using is that it is choosing appropriate formats for you depending on the user's locale. There is not an option to include the time zone twice, but you can use string concatenation and JavaScript's Intl API to achieve something like what you want: console.log( (new Date()).toLocaleString(["en-US"], {timeZoneName: "short"}) + ' ' + Intl.DateTimeFormat().resolvedOptions().timeZone ); > "5/1/2021, 5:48:19 PM EDT America/New_York" More on reddit.com
🌐 r/Frontend
11
6
May 3, 2021
JavaScript - how to get current time but in different time zone(s)
I'm working on a project, where I need to get current time but in different time zone(s). I found that there is no way to achieve this with aqDateTime or aqConvert object. So I thought of some custom JavaScript code, but all of them are using 3rd party libs. I guess there is no way to import custom libs in TC? Does anyone know or use some kind of TimeZone... More on community.smartbear.com
🌐 community.smartbear.com
6
0
February 9, 2024
[AskJS] How to get the date and time base on the users timezone?
The JavaScript you write is going to run on the users web browser which will get the time based on their timezone. If you want to load the time based on a given timezone check this out var now = new Date().toLocaleString("en-US", {timeZone: "America/New_York"}); console.log(now); More on reddit.com
🌐 r/javascript
2
3
May 6, 2024
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Intl › Locale › getTimeZones
Intl.Locale.prototype.getTimeZones() - JavaScript | MDN
July 10, 2025 - 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 ...
🌐
Castle.io
blog.castle.io › how-to-detect-browser-time-zone-using-javascript
How to detect browser time zone using JavaScript
August 18, 2025 - In this post, we’ll show two ways to extract the client's time zone in JavaScript. ... Correlate browser-derived location with IP-based geolocation. Compare against language settings (Accept-Language header or navigator.languages). Detect automation frameworks and spoofing setups (common in anti-detect browsers). Add entropy to the fingerprint for more accurate user/device identification. The best way to get the user’s time zone is via the Intl.DateTimeFormat().resolvedOptions().timeZone API, introduced in modern browsers (supported since Chrome 24, Safari 10, Firefox 29).
🌐
WebBrowserTools
webbrowsertools.com › timezone
What is my Timezone :: WebBrowserTools
This page shows your timezone data; this data is derived from window.Date JavaScript API. There are six methods designed to extract timezone data from the javascript engine.
Find elsewhere
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Temporal › Now › timeZoneId
Temporal.Now.timeZoneId() - JavaScript | MDN
December 8, 2025 - The Temporal.Now.timeZoneId() static method returns a time zone identifier representing the system's current time zone. Most systems will return a primary time zone identifier such as "America/New_York", though offset time zone identifier such as "-04:00" is possible too.
🌐
W3Schools
w3schools.com › Jsref › jsref_gettimezoneoffset.asp
JavaScript Date getTimezoneOffset() Method
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
🌐
Reddit
reddit.com › r/frontend › how to get only the timezone name in javascript?
r/Frontend on Reddit: How to get only the timeZone name in JavaScript?
May 3, 2021 -

I already tried the codes below, but they don't work because they include Date and\or Time. I need to get only the timezone name. (OBS: timezone name, not IANA Time Zone)

Is it possible to force toLocaleString() to show timeZoneName "short" and "long" at same time?

Example: 5/2/2021, 02:34:28 GMT+12:45 Chatham Standard Time

Get_TimeZone_Name(Functions) for Modern Browsers (2017-2018) and for IE11!

<!DOCTYPE html>

<div id="Output"></div>

<script>

Date_Object = new Date();

document.getElementById("Output").innerText =
Date_Object.toLocaleString([], {timeZoneName:"short"}) + "\n" +
Date_Object.toLocaleDateString([], {timeZoneName:"short"}) + "\n" +
Date_Object.toLocaleTimeString([], {timeZoneName:"short"}) + "\n" +
"\n" +
Date_Object.toLocaleString([], {timeZoneName:"long"}) + "\n" +
Date_Object.toLocaleDateString([], {timeZoneName:"long"}) + "\n" +
Date_Object.toLocaleTimeString([], {timeZoneName:"long"}) + "\n" +
"\n" +
Date_Object.toLocaleString("en-US", {timeZoneName:"long"}) + "\n" +
Date_Object.toLocaleDateString("en-US", {timeZoneName:"long"}) + "\n" +
Date_Object.toLocaleTimeString("en-US", {timeZoneName:"long"}) + "\n" +
"\n" +
Date_Object.toLocaleString("pt-BR", {timeZoneName:"long"}) + "\n" +
Date_Object.toLocaleDateString("pt-BR", {timeZoneName:"long"}) + "\n" +
Date_Object.toLocaleTimeString("pt-BR", {timeZoneName:"long"}) + "\n" +
"\n" +
Date_Object.toLocaleString("ja-JP", {timeZoneName:"long"}) + "\n" +
Date_Object.toLocaleDateString("ja-JP", {timeZoneName:"long"}) + "\n" +
Date_Object.toLocaleTimeString("ja-JP", {timeZoneName:"long"}) + "\n" +
"\n" +
Date_Object.toLocaleString("ar-SA", {timeZoneName:"long"}) + "\n" +
Date_Object.toLocaleDateString("ar-SA", {timeZoneName:"long"}) + "\n" +
Date_Object.toLocaleTimeString("ar-SA", {timeZoneName:"long"}) + "\n" +
"";

</script>
🌐
Go Make Things
gomakethings.com › getting-a-date-in-the-current-users-timezone-with-javascript
Getting a date in the current user's timezone with JavaScript | Go Make Things
February 5, 2025 - Next, we’ll use the Date.now() method to get a Unix timestamp for right now in the current user’s timezone.
🌐
Quora
quora.com › How-do-you-get-the-extract-users-timezone-using-JavaScript
How to get the extract user's timezone using JavaScript - Quora
Answer (1 of 3): The Internationalization API supports getting the user’s timezone, and is supported in all current browsers: [code]Intl.DateTimeFormat().resolvedOptions().timeZone => "Pacific/Auckland" [/code]Keep in mind that on some older browser versions that do support the ...
🌐
ServiceNow Community
servicenow.com › community › developer-forum › how-to-i-get-the-user-s-current-timezone-settings-via-api-calls › m-p › 1928078
Solved: How to I get the user's current Timezone settings ... - ServiceNow Community
August 12, 2016 - Using those along with getTimeZoneOffset() should allow you to get what you need. ... Out of curiosity, what should I look up to find this area of the wiki site? I had looked in timezone related docs such as Using Time Zones - ServiceNow Wiki and GlideSystem Date and Time Functions - ServiceNow Wiki and there is no mention of this function on either of those.
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › how-to-set-timezone-offset-using-javascript
How to set timezone offset using JavaScript ? - GeeksforGeeks
July 15, 2025 - // Date object let date = new Date(); // Offset variable will store // timezone offset between // UTC and your local time let offset = date.getTimezoneOffset(); console.log("Timezone offset: ", offset, " minutes");
🌐
Medium
toastui.medium.com › handling-time-zone-in-javascript-547e67aa842d
Handling Time Zone in JavaScript. Recently, I worked on a task of adding… | by TOAST UI | Medium
August 30, 2019 - But don’t get disappointed yet. Until now, we discussed some problems of JavaScript and how to solve them. Now we’re ready to use a well built library. Moment is a well established JavaScript library that is almost the standard for processing date. Providing a variety of date and formatting APIs, it is recognized by so many users recently as stable and reliable. And there is Moment Timezone, an extension module, that solves all the problems discussed above.
🌐
JavaScript in Plain English
javascript.plainenglish.io › how-to-get-the-users-time-zone-and-offset-in-javascript-da53adb27f32
How to Get the User’s Time Zone and Offset in JavaScript? | by John Au-Yeung | JavaScript in Plain English
December 5, 2021 - Also, we can use theIntl.DateTimeFormat().resolvedOptions().timeZone property to get the user’s time zone. For instance, if we have: console.log(Intl.DateTimeFormat().resolvedOptions().timeZone) Follow · 175K followers · ·Last published 23 hours ago · New JavaScript and Web Development content every day.
🌐
Attacomsian
attacomsian.com › blog › javascript-current-timezone
How to get current time zone in JavaScript
September 10, 2022 - To get the current browser's time zone, you can use the getTimezoneOffset() method from the JavaScript Date object.
🌐
Medium
maayansavir.medium.com › get-the-timezone-offset-on-client-side-49fc4e484364
Get The Timezone Offset on Client side | by Maayan Savir | Medium
January 10, 2021 - With that, the Java code can convert ... a UTC-8 timezone. With the backend limitations, I had to find a way on how to send a UTC timestamp (with the offset) to the back from the front. Currently, all the front does is getting a timestamp from the server (the UTC time as it is - before the database query change), creates a new Date() (while using JavaScript) and converts ...
🌐
Netlify
netlify.com › blog › how-to-get-timezone-in-javascript-with-edge-functions
How to get the user‘s timezone in JavaScript with Edge Functions
You don‘t need client-side JavaScript to adapt and localize dates and times according to timezone — use timezone data in Netlify Edge Functions with JavaScript native Date()!
🌐
TutorialsPoint
tutorialspoint.com › how-to-detect-user-timezone-in-javascript
How to Detect User Timezone in JavaScript?
September 13, 2023 - To get the timezone, use the getTimezoneOffset() in JavaScript. This method returns the time difference between UTC time and local time.