| getTimezoneOffset() The getTimezoneOffset() method is used to return the number of minutes corresponding to the difference between GMT and the time on the client computer, which is the time specified by your operating system, and used by the Date object. syntax: dateName.getTimezoneOffset() EXAMPLE dateObject = new Date(); document.write("The date is: " + dateObject.getTimezoneOffset()); The example shows the creation of a new Date object, called dateObject. It is then used within a document.write statement, with the getTimezoneOffset() method to display the number of minutes corresponding to the difference between GMT and the time on the client computer after the string of text. |