Modifier and Type | Field and Description |
---|---|
static Set<String> |
KNOWN_TIMEZONE_IDS
An immutable Set of all TimeZone IDs supported by the TimeZone class
at the moment the TimeZoneUtils was initialized.
|
Modifier and Type | Method and Description |
---|---|
static TimeZone |
getTimeZone(String ID)
This method is provided as a replacement for TimeZone.getTimeZone but
without the annoying behavior of returning "GMT" for gibberish input.
|
static TimeZone |
parseTimezone(String tzStr)
Parse the specified timezone ID.
|
public static final Set<String> KNOWN_TIMEZONE_IDS
TimeZone.getAvailableIDs(int)
public static final TimeZone getTimeZone(String ID)
This method will return null unless the input is either:
ID
- Either a TimeZone ID found in KNOWN_TIMEZONE_IDS, or a "CustomID" specified as a GMT offset.KNOWN_TIMEZONE_IDS
,
TimeZone
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.