Language version: | ActionScript 3.0
|
The TimeZone class provides information about timezones that can be used in date calculations
and to find out about different locations and their time zone offsets. The information available
will vary according to the operating system being used as the time zone objects are created based
on APIs that are made available by the device OS.
To list available time zones, use the TimeZone.availableTimeZoneNames
property which will
be initialized on first use by the operating system. Strings that are available here can then be
used to create a TimeZone object using the TimeZone.getTimeZone
method.
availableTimeZoneNames:Vector.<String>
[read-only]
Language version: | ActionScript 3.0
|
Retrieves a list of the available time zone names that can be used on this operating system.
Implementation
public static function get availableTimeZoneNames():Vector.<String>
daylightSavingsOffset:int
[read-only]
Language version: | ActionScript 3.0
|
The offset between this time zone and UTC during daylight savings, in milliseconds.
Note: if this time zone does not use daylight savings, this value will be the same
as the value of rawOffset
.
Implementation
public function get daylightSavingsOffset():int
displayName:String
[read-only]
Language version: | ActionScript 3.0
|
The display name of this time zone.
Implementation
public function get displayName():String
rawOffset:int
[read-only]
Language version: | ActionScript 3.0
|
The standard offset between this time zone and UTC, in milliseconds.
Implementation
public function get rawOffset():int
usesDaylightSavings:Boolean
[read-only]
Language version: | ActionScript 3.0
|
Whether this time zone has a daylight savings change.
Implementation
public function get usesDaylightSavings():Boolean
public function getOffset(date:Date):int
Language version: | ActionScript 3.0
|
The time offset between this timezone and UTC, for a particular (UTC) date.
Note: for any date in UTC format, there should be exactly one match for the
offset value. Reversing this process does not always work, for example some local
times do not exist due to clocks changing forward, and some local times happen twice
due to the clocks changing backwards. Hence to find the correct offset, the input
date must be in UTC format.
Parameters
| date:Date — The date/time information at which to check the time offset
|
Returns
| int —
The offset, in milliseconds, between GMT and local time at the given date.
|
public static function getTimeZone(timeZoneName:String):TimeZone
Language version: | ActionScript 3.0
|
Obtains a TimeZone object using a string that is found in the list of availableTimeZoneNames
.
Pass in a null string to get the TimeZone object representing the current location of the device.
Parameters
| timeZoneName:String — The name of the time zone to retrieve, or null for the current device time zone.
|
Returns
| TimeZone —
The TimeZone object corresponding to the requested time zone
|
Throws
| ArgumentError — If the requested timeZoneName is not a valid name (and isn't null)
|
© 2004-2022 Adobe Systems Incorporated. All rights reserved.
Mon Feb 26 2024, 5:22 PM GMT