ZoneInfo userTimeZone = getComponent(TimeZoneManager).getLoggedInUserTimeZone();
But this throws the error cannot find symbol [ERROR] symbol: variable TimeZoneManager. even i have imported import com.atlassian.jira.timezone.*; in java file. But same is working fine in jira console.