The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

LocalDate time difference between server machine and local time

BarL
October 17, 2019

The following script returns the day of the first transition. the issue is that in order to see day I need to use Template of "Text Field (multi-line)". there is a time gap between my office and the server location - different zones (10 hours difference).

How do I overcome this issue?

package com.onresolve.jira.groovy.test.scriptfields.scripts
import com.atlassian.jira.component.ComponentAccessor

def changeHistoryManager = ComponentAccessor.getChangeHistoryManager()
def created = changeHistoryManager.getChangeItemsForField(issue, "status").find {
it.toString == "In Progress"
}?.getCreated()

def dayOfWeek = created?.toLocalDateTime()?.getDayOfWeek()

return dayOfWeek

  

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events