From http://www.w3schools.com (Copyright Refsnes Data)
JavaScript Date Object
The getTimezoneOffset() method returns the difference in minutes between Greenwich Mean Time (GMT) and local time.
For example, If your time zone is GMT+2, -120 will be returned.
| dateObject.getTimezoneOffset() |
Note: The returned value of this method is not a constant, because of the practice of using Daylight Saving Time.
Note: This method is always used in conjunction with a Date object.
ExampleConvert the timezone difference into GMT +/- hours:
The output of the code above will be: Try it yourself » |
JavaScript Date Object
From http://www.w3schools.com (Copyright Refsnes Data)