August 1999
Intermediate to advanced
1488 pages
72h 53m
English
date.getTimezoneOffset()
The getTimezoneOffset() method returns the difference between the time zones of local time and Greenwich Mean Time (GMT). This difference is returned as an integer representing the number of minutes between the time zone of the local time and GMT. Although this is a method of a Date object, the actual date and time associated with the date is irrelevant because the time zone difference is based on the environment settings in which the JavaScript code is run.
The code in Listing 6.80 displays the time zone offset by using the getTimezoneOffset() method. Notice that when the date and time ...
Read now
Unlock full access