---
title: "Fetch the Current User's Time Zone"
canonical: "https://support.appfire.com/space/JMWE/461897967/Fetch%20the%20Current%20User's%20Time%20Zone"
format: markdown
---
> Macro (aura-html)

### Abstract

This code snippet fetches the current user's time zone.

### Logic

Access the Time zone service of Jira and fetch the logged in user time zone

### Snippet

```groovy
import com.atlassian.jira.timezone.TimeZoneManager

// access timeZone of current user
def userTimeZone = getComponent(TimeZoneManager).getLoggedInUserTimeZone()
```

### Placeholders

N/A

### Examples

<span style="color: #333333">The outcome of the code snippet is a </span>`zoneInfo`<span style="color: #333333"> that you can use to create a calendar instance in the current user time zone.</span>

```groovy
import com.atlassian.jira.timezone.TimeZoneManager

// access timeZone of current user
def userTimeZone = getComponent(TimeZoneManager).getLoggedInUserTimeZone()
c1 = GregorianCalendar.getInstance(userTimeZone);
return c1.format("HH:mm")
```

### References

- getComponent()
- [**Groovy Documentation**](http://groovy.codehaus.org/User+Guide)

### Related articles

> Macro (contentbylabel)

> Macro (details)
> 
> | **Related issues** |  |
> | --- | --- |