Class TimeZone

TimeZone enumeration and services.

class TimeZone

more...

Summary

describe()Returns a descriptive string naming the required timezone.
getDisplacement()Returns the distance in minutes from the GMT time of a given timezone
getLocal()Return local time zone code.

Detailed description

class TimeZone


TimeZone enumeration and services.

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:

Methods

describe()

Returns a descriptive string naming the required timezone.

TimeZone.describe( tz )

tzA time zone code.
Returns:A 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 )

tzA time zone code.
Returns:A 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( )

Returns:A time zone code coresponding to the system local timezone.

To get a descriptive name of local timezone, use:

   TimeZone.describe( TimeZone.getLocal() )


Made with faldoc 2.2.0