TimeZone class.
The localized time zone names available from the implementations of
this class are also the source for the
DateFormatSymbols.getZoneStrings() method.
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract String | Returns: the human-readable name of the given time zone in the given locale, or null if it's not available.a time zone ID string ID, boolean if true, return the daylight saving name. daylight, int either style, Locale TimeZone. or
TimeZone.the desired locale locale)Returns a name for the given time zone ID that's suitable for presentation to the user in the specified locale. |
| public String | Returns: the human-readable generic name of the given time zone in the given locale, ornull if it's not available.a time zone ID string ID, int either style, Locale TimeZone. or
TimeZone.the desired locale locale)Returns a generic name for the given time zone |
| TimeZoneNameProvider | back to summary |
|---|---|
| protected TimeZoneNameProvider() Sole constructor. (For invocation by subclass constructors, typically implicit.) | |
| getDisplayName | back to summary |
|---|---|
| public abstract String getDisplayName(String ID, boolean daylight, int style, Locale locale) Returns a name for the given time zone ID that's suitable for presentation to the user in the specified locale. The given time zone ID is "GMT" or one of the names defined using "Zone" entries in the "tz database", a public domain time zone database at https://www.iana.org/time-zones. The data of this database is contained in a file whose name starts with "tzdata", and the specification of the data format is part of the zic.8 man page, which is contained in a file whose name starts with "tzcode".
If
| |
| getGenericDisplayName | back to summary |
|---|---|
| public String getGenericDisplayName(String ID, int style, Locale locale) Returns a generic name for the given time zone The default implementation of this method returns
| |