How could I manage to get the result of 2023-11-16T09:54:12.123 using the ZonedDateTime object in Java 11?
I wrote:
zdt.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
and got ISO_LOCAL_DATE_TIME: 2023-11-16T17:25:27.1881768
I'd like to remove the nanoseconds having only three digits.
Two ways to do it: