Javascript Reference - JavaScript getTimezoneOffset() Method








getTimezoneOffset()
Returns the number of minutes that the local time zone is off set from UTC.

For example, Eastern Standard Time returns 300. This value changes when an area goes into Daylight Saving Time.

UTC time is the same as GMT time.

If your time zone is GMT+2, -120 will be returned.

Browser Support

getTimezoneOffset() Yes Yes Yes Yes Yes

Syntax

dateObject.getTimezoneOffset();




Parameters

None.

Return Value

return a number representing the time difference between UTC and Local Time, in minutes.

Example


var myDate = new Date();
console.log(myDate.getTimezoneOffset());

The code above generates the following result.