java how to format date to utc 0 code example
Example 1: java get date in utc
OffsetDateTime now = OffsetDateTime.now(ZoneOffset.UTC);
System.out.println(now);
Example 2: new date to utc string java
myJavaUtilDate.toInstant().toString()
// output = "2020-05-05T19:46:12.912Z"