getTimezoneOffset( )
Returns the time zone offset for a date object in the current locale, in minutes.
Syntax
<oRef>.getTimezoneOffset( )
<oRef>
A date object created in the locale in question.
Property of
Date
Description
All time zones have an offset from GMT (Greenwich Mean Time), from twelve hours behind to twelve hours ahead. The getTimezoneOffset( ) method returns this offset, in minutes, for the locale in which the Date object was created, taking Daylight Savings Time into account.
For example, the United States and Canadian Pacific time zone is eight hours behind GMT. A date in January, when Daylight Savings Time is not in effect, created in the Pacific time zone would have a time zone offset of –480. A date in July, when Daylight Savings Time is in effect, would have a time zone offset of –420, or seven hours, since Daylight Savings Time moves clocks one hour forward, or closer, to GMT.
In Windows, the locale is determined by the Time Zone setting in each system’s Date/Time properties. This can be set in the Control Panel, or by double-clicking the clock in the Taskbar.
All Date objects default to the time zone setting of the current locale.