The getTimezoneOffset() method returns the time difference between UTC time and local time, in minutes.
The getTimezoneOffset() method returns the time difference between UTC time and local time, in minutes.
For example, if your time zone is GMT+2, -120 will be returned.
The returned value might change because of Daylight Saving Time.
UTC time is the same as GMT time.
Date.getTimezoneOffset()
None
A Number, representing the time difference between UTC and Local Time, in minutes
Return the timezone difference between UTC and Local Time:
//display the timedifference between UTC and local time. var d = new Date(); var n = d.getTimezoneOffset(); console.log(n);//from ww w . j a v a 2 s.c o m