Table of Contents

About

This page is about the time zone in Javascript

Management

Get description

timeZoneDesc = Intl.DateTimeFormat().resolvedOptions().timeZone
console.log("Your time zone is: "+timeZoneDesc)

Get the actual offset

Javascript with getTimezoneOffset(). The method returns the time zone difference (in minutes) from UTC (ie UTC - TimeZone)

offsetMinutes = (new Date()).getTimezoneOffset()
console.log("To go to UTC, you need to add or subtract")
console.log("  * "+offsetMinutes+" minutes" )
console.log("  * "+offsetMinutes/60+" zones")