Interface StdZoneIdentifier

All Superinterfaces:
TZID
All Known Implementing Classes:
AFRICA, AMERICA, AMERICA.ARGENTINA, AMERICA.INDIANA, AMERICA.KENTUCKY, AMERICA.NORTH_DAKOTA, ANTARCTICA, ASIA, ATLANTIC, AUSTRALIA, EUROPE, INDIAN, PACIFIC

public interface StdZoneIdentifier extends TZID

Identifies a timezone in a standard way.

This timezone ID has the Olson-format "{region}/{city}".

Lexical comparisons of IDs should always be done by the method TZID.canonical() because an object of type TZID is only designed for encapsulating a canonical name. The comparison using the method equals() is not allowed.

The predefined enum constants actually mirror the TZ-version 2013i and are usually associated wih timezones whose rules have changed or are about to change. The enum constants do NOT mean that they are also valid or that there are always well-defined timezone data behind. For example we have ASIA.HEBRON which exists first since TZ-version 2011n. Another example is the ID "Europe/Tiraspol" which existed for a short time and is missing in the version 2011n however. Such timezone IDs will be marked as deprecated and labelled with a suitable alias. Purpose of predefined constants is just a safe and performant access (protection against typing errors).

If a timezone offset is known for historical timezones before the year 1970 then users should generally prefer the class ZonalOffset because the timezone data associated with the enum constants are not necessarily correct.

Note: All implementations must be immutable and serializable.

Author:
Meno Hochschild
  • Method Summary

    Modifier and Type
    Method
    Description
    Yields the exemplar city.
    Yields the belonging country in ISO-3166-format - related to the exemplar city.
    Yields the timezone region - in most cases a continent.

    Methods inherited from interface net.time4j.tz.TZID

    canonical
  • Method Details

    • getRegion

      String getRegion()

      Yields the timezone region - in most cases a continent.

      Returns:
      the first part of zone identifier (for example "Europe" in "Europe/Paris")
    • getCity

      String getCity()

      Yields the exemplar city.

      Returns:
      the second part of zone identifier (for example "Paris" in "Europe/Paris")
    • getCountry

      String getCountry()

      Yields the belonging country in ISO-3166-format - related to the exemplar city.

      Returns:
      country code
      Since:
      3.1