Note
We've packed up and moved from Confluence to Discourse to bring you a better, more interactive space. Out of courtesy we didn't migrate your user account so - you will have to signup again
The Exalate team will be on holiday for the coming days - returning Jan 4
Enjoy & stay safe
Hi Everyone:
I started having this issue after 2 years that the code has been in place and working.
No signature of method: java.sql.Timestamp.format() is applicable for argument types: (String, sun.util.calendar.ZoneInfo) values: [d/MMM/yy h:mm a, sun.util.calendar.ZoneInfo[id="America/New_York",offset=-18000000,dstSavings=3600000,useDaylight=true,transitions=235,lastRule=java.util.SimpleTimeZone[id=America/New_York,offset=-18000000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]]] Possible solutions: toYear(), from(java.time.Instant), from(java.time.Instant)
------------- Code --------------
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
def formatdate(dateString) {
def inputDateString = dateString
def inputDateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSX"
def outputDateFormat = "d/MMM/yy h:mm a"
def outputTZ = TimeZone.getTimeZone('America/New_York')
def convertedDate = dateString.format(outputDateFormat, outputTZ)
return convertedDate
}
Can Someone help me? I am using exalate with Jira Cloud