I am trying to create a new issue using scriptrunner and I need to hard code the time on a custom date field. so I'd like it to have the current date with a time of 4:00 AM
I was hoping to use the new Date() function and then hard code the time to 4:00 AM instead of the current time.
def startTime = customFieldManager.getCustomFieldObjectByName("Start Time")
Date dateStart = new Date()
issue.setCustomFieldValue(startTime, new Timestamp(new Date().time))
The output of the customfield(Start Time) should be display as follows dd/mm/yy 4:00 AM