Slackbot
10/26/2023, 2:59 AMrobertjstroud
10/26/2023, 11:56 AMrobertjstroud
10/26/2023, 12:01 PMrobertjstroud
10/26/2023, 12:06 PMjava.time.format.DateFormatter object to convert what looks like an ISO_INSTANT date and time into something more readable such as an RFC_1123_DATE_TIME:
https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.htmlalexove
10/26/2023, 2:49 PMimplementation "org.codehaus.groovy:groovy-dateutils:3.0.19"
Into build.gradle and modify my gson view like:
json {
date mydate.format('dd-MM-yy HH:mm')
}
And works finerobertjstroud
10/26/2023, 5:35 PMgroovy-dateutil module is based on Java's legacy Date and Calendar types - it might better to use the groovy-datetime module , which supports working with the new Date/Time API
https://groovy-lang.org/groovy-dev-kit.html#_working_with_datetime_typesalexove
10/27/2023, 4:03 AM