Automatically Populate Timezone from a Created Issue

Usage FAQ

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Atlassian Support likes to use customers' timezones to respond more effectively to support tickets. We extract timezone information automatically, so customers don't need to enter it manually. To do that, we add JavaScript to our custom field description:

 

No longer works starting JIRA 4.4

This Javascript no longer works starting from JIRA 4.4. It only works up until JIRA 4.3.

Your timezone. The value is set automatically from your browser, so please only modify if it's incorrect. <br>
<b><a href="http://www.worldtimezone.com/" target="timezone">World Timezones</a></b>

<script language="JavaScript"> 

<!-- 
function setCustomerTimezone()
{
	tzlist = document.getElementById("customfield_10421");
	if (tzlist) {
		if (/CreateIssueDetails.jspa/.test(tzlist.form.action)) {
// Value has not yet been set			if (tzlist.value == -1) { 
				offset = new Date().getTimezoneOffset() / 60; // hours from GMT
				if (offset <= 0) { tzlist.value="GMT+"+(-offset);  }
				else { tzlist.value = "GMT-"+offset; }
//			}
		}
	}
}

window.onload = setCustomerTimezone; 

//-->
</script>
Related Pages

Setting Priority field value based on customfield value
How to Set Default Comment Security Level
Creating Help for a Custom Field
Displaying a Field Based on Another Field Selection

Last modified on Sep 3, 2012

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.