def inputDateString = "Wed Aug 23 00:00:00 UTC 2017"
def inputDateFormat = "E MMM dd HH:mm:ss Z yyyy"

def outputDateFormat = "yyyy-MM-dd'T'HH:mm:ssZ"
def outputTZ = TimeZone.getTimeZone('CET')

def date = Date.parse(inputDateFormat, inputDateString)
def convertedDate = date.format(outputDateFormat, outputTZ)

println convertedDate