Advertisement
728x90
You can use the getTimezoneOffset method of the date object. This method returns the time zone difference, in minutes, from current locale (host system settings) to UTC
javascript
1var offset = new Date().getTimezoneOffset();
2
3console.log(offset); // -480Advertisement
Responsive Ad
🎯 Practice NowRelated Challenge
JavaScript Coding Exercise 38
Test your knowledge with this interactive coding challenge.
Start CodingAdvertisement
728x90
294of476