@PublicApi
public interface TimeZoneService
The TimeZoneService is also used to retrieve a list of time zone and regions for the administration UI.
Modifier and Type | Field and Description |
---|---|
static String |
JIRA |
static String |
SYSTEM |
Modifier and Type | Method and Description |
---|---|
void |
clearDefaultTimeZone(JiraServiceContext serviceContext)
Reset the default time zone to the JVM time zone.
|
void |
clearUserDefaultTimeZone(JiraServiceContext serviceContext)
Resets the time zone for this user to the JIRA default time zone.
|
TimeZoneInfo |
getDefaultTimeZoneInfo(JiraServiceContext serviceContext)
Returns the default time zone which is globally configured.
|
String |
getDefaultTimeZoneRegionKey()
Return the region key of the current default time zone.
|
TimeZoneInfo |
getJVMTimeZoneInfo(JiraServiceContext serviceContext)
Returns the time zone of the JVM
|
List<TimeZoneInfo> |
getTimeZoneInfos(JiraServiceContext serviceContext)
Retrieves all time zones.
|
List<RegionInfo> |
getTimeZoneRegions(JiraServiceContext serviceContext)
Returns all time zone regions.
|
TimeZoneInfo |
getUserTimeZoneInfo(JiraServiceContext serviceContext)
Return the time zone for this user.
|
void |
setDefaultTimeZone(String timeZoneId,
JiraServiceContext serviceContext)
Allows to set the default time zone.
|
void |
setUserDefaultTimeZone(String timeZoneId,
JiraServiceContext serviceContext)
Sets the default time zone for this user.
|
boolean |
usesJiraTimeZone(JiraServiceContext serviceContext)
Returns true if this user is using the JIRA default time zone or false if the user has is using a custom time zone.
|
boolean |
useSystemTimeZone()
Returns true if the JVM time zone is used, otherwise false.
|
static final String SYSTEM
static final String JIRA
TimeZoneInfo getJVMTimeZoneInfo(JiraServiceContext serviceContext)
serviceContext
- JIRA Service Context containing the user that is retrieving the time zone information.TimeZoneInfo getDefaultTimeZoneInfo(JiraServiceContext serviceContext)
serviceContext
- JIRA Service Context containing the user that is retrieving the time zone information.List<RegionInfo> getTimeZoneRegions(JiraServiceContext serviceContext)
serviceContext
- JIRA Service Context containing the user that is retrieving the time zone information.List<TimeZoneInfo> getTimeZoneInfos(JiraServiceContext serviceContext)
serviceContext
- JIRA Service Context containing the user that is retrieving the time zone information.boolean useSystemTimeZone()
void setDefaultTimeZone(String timeZoneId, JiraServiceContext serviceContext)
timeZoneId
- the id of the time zone.serviceContext
- JIRA Service Context containing the user that changing the default time zone.void clearDefaultTimeZone(JiraServiceContext serviceContext)
serviceContext
- JIRA Service Context containing the user that changing the default time zone.String getDefaultTimeZoneRegionKey()
void clearUserDefaultTimeZone(JiraServiceContext serviceContext)
serviceContext
- JIRA Service Context containing the user.TimeZoneInfo getUserTimeZoneInfo(JiraServiceContext serviceContext)
serviceContext
- JIRA Service Context containing the user.boolean usesJiraTimeZone(JiraServiceContext serviceContext)
serviceContext
- void setUserDefaultTimeZone(String timeZoneId, JiraServiceContext serviceContext)
timeZoneId
- the time zone idserviceContext
- JIRA Service Context containing the user.Copyright © 2002-2017 Atlassian. All Rights Reserved.