Date.getTimezoneOffset( ) Method | Flash 5 |
the number of minutes between local time and UTC (a.k.a. GMT) |
An integer representing the current number of minutes between the local time zone and the actual UTC (Greenwich meridian) time � positive if local time is behind UTC; negative if local time is ahead of UTC. Includes adjustments for local daylight savings time depending on the day of the year.
When invoked in Eastern Daylight Time (EDT) during daylight savings, the following code returns the value 240 (240 minutes is 4 hours):
myDate = new Date(); trace(myDate.getTimezoneOffset()); // Displays: 240
However, when invoked in EDT, during non-daylight savings times of year, the same code returns 300 (300 minutes is 5 hours), which is the offset between Eastern Standard Time (EST) and UTC.