fork(100) download
  1. def inputDateString = "Wed Aug 23 00:00:00 UTC 2017"
  2. def inputDateFormat = "E MMM dd HH:mm:ss Z yyyy"
  3.  
  4. def outputDateFormat = "yyyy-MM-dd'T'HH:mm:ssZ"
  5. def outputTZ = TimeZone.getTimeZone('CET')
  6.  
  7. def date = Date.parse(inputDateFormat, inputDateString)
  8. def convertedDate = date.format(outputDateFormat, outputTZ)
  9.  
  10. println convertedDate
Success #stdin #stdout 0.86s 4456448KB
stdin
Standard input is empty
stdout
2017-08-23T02:00:00+0200