public class TimeZone extends Object
TimeZone
.
Call getInstance(String)
to get a specific TimeZone object.
The list of acceptable time zones is loaded once from a properties file, and trying to retrieve a time zone not in this list will return the application's default time zone.
TODO CONFDEV-27850: should be using a CacheLoader for timeZonesByID to avoid race conditions on TimeZone construction.
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static TimeZone |
getDefault()
Deprecated.
since 5.7. Use
TimeZoneManager.getDefaultTimeZone() } instead. |
String |
getDisplayOffset() |
String |
getID() |
static TimeZone |
getInstance(String timeZoneID)
Returns the flyweight
TimeZone for the given ID, which is the same
instance used for this time zone throughout the system. |
static TimeZone |
getInstance(TimeZone timeZone) |
String |
getMessageKey() |
static List<TimeZone> |
getSortedTimeZones() |
TimeZone |
getWrappedTimeZone() |
int |
hashCode() |
String |
toString() |
public static TimeZone getInstance(String timeZoneID)
TimeZone
for the given ID, which is the same
instance used for this time zone throughout the system.timeZoneID
- a valid time zone ID as specified by TimeZone
TimeZone
specified by the time zone ID, or the default time
zone if timeZoneID is null or not in the list of time zones returned by
getSortedTimeZones()
.public String getID()
TimeZone.getID()
.public String getMessageKey()
ConfluenceActionSupport.getText(String)
to display the localised name of the time zone.public String getDisplayOffset()
@Deprecated public static TimeZone getDefault()
TimeZoneManager.getDefaultTimeZone()
} instead.TimeZoneManager.getDefaultTimeZone()
}com.atlassian.sal.api.timezone.TimeZoneManager#getDefaultTimeZone()}
public static List<TimeZone> getSortedTimeZones()
Copyright © 2003–2017 Atlassian. All rights reserved.