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