User Guide

250 Chapter 2: ActionScript Language Reference
Date.getTimezoneOffset()
Availability
Flash Player 5.
Usage
my_date.getTimezoneOffset() : Number
Parameters
None.
Returns
An integer.
Description
Method; returns the difference, in minutes, between the computer’s local time and universal time.
Example
The following example returns the difference between the local daylight saving time for San
Francisco and universal time. Daylight saving time is factored into the returned result only if the
date defined in the Date object occurs during daylight saving time.
var my_date:Date = new Date();
trace(my_date.getTimezoneOffset());
// 420 is displayed in the Output panel
// (7 hours * 60 minutes/hour = 420 minutes).
// This example is Pacific Daylight Time (PDT, GMT-0700).
// Result will vary depending on locale and time of year.