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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events