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.
getTimezoneOffset() |
Yes | Yes | Yes | Yes | Yes |
dateObject.getTimezoneOffset();
None.
return a number representing the time difference between UTC and Local Time, in minutes.
var myDate = new Date();
console.log(myDate.getTimezoneOffset());
The code above generates the following result.