I need the current system date and time in 2022-10-03T19:45:47.844Z format in a java class.
I tried using the zoneddatetime and simple date format but couldn't get the write syntax or code from online. I'm beginner in Java, any help is appreciated. Thanks.
ZonedDateTime.now().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)