1.37Class TimeZone

TimeZone enumeration and services.

Class TimeZone

This class proves the list of managed timezones and various services needed to handle them.

The enumerative part contains the following constants, representing west, east and some named timezones:

- local: Special local zone (unassigned, but relative to current location).

- W1 to W12 (-1h to -12h)

- NFT

- NONE: No/neutral/unknown timezone.

Methods
describeReturns a descriptive string naming the required timezone.
getDisplacementReturns the distance in minutes from the GMT time of a given timezone
getLocalReturn local time zone code.

Methods

describe

Returns a descriptive string naming the required timezone.

TimeZone.describe( tz )
tz A time zone code.
ReturnA timezone name.

This static method, callable directly on the TimeZone class, returns a RFC 2822 compliant timezone name, given a timezone code. The "name" is in the format "+/-hhmm".

getDisplacement

Returns the distance in minutes from the GMT time of a given timezone

TimeZone.getDisplacement( tz )
tz A time zone code.
ReturnA relative time distance in minutes.

This static method, callable directly on the TimeZone class, returns the time displacement of a determined time zone with respect to GMT.

getLocal

Return local time zone code.

TimeZone.getLocal()
ReturnA time zone code coresponding to the system local timezone.

To get a descriptive name of local timezone, use:


      TimeZone.describe( TimeZone.getLocal() )
Made with http://www.falconpl.org