/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.time.* ;
import java.time.temporal.* ;
import java.time.format.* ;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
// Capture the current moment in UTC, then generate text representing that value in standard ISO 8601 using the `Z` offset-indicator.
Instant
.now()
.truncatedTo( ChronoUnit.MILLIS )
.toString()
;
OffsetDateTime
.now( ZoneOffset.UTC )
.truncatedTo( ChronoUnit.MILLIS )
.format(
DateTimeFormatter.ofPattern( "uuuu-MM-dd'T'HH:mm:ss.SSSxxx" )
)
;
System.
out.
println( "outputZ: " + outputZ
) ; System.
out.
println( "outputZeros: " + outputZeros
) ;
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgppbXBvcnQgamF2YS50aW1lLiogOwppbXBvcnQgamF2YS50aW1lLnRlbXBvcmFsLiogOwppbXBvcnQgamF2YS50aW1lLmZvcm1hdC4qIDsKCi8qIE5hbWUgb2YgdGhlIGNsYXNzIGhhcyB0byBiZSAiTWFpbiIgb25seSBpZiB0aGUgY2xhc3MgaXMgcHVibGljLiAqLwpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgogICAgLy8gQ2FwdHVyZSB0aGUgY3VycmVudCBtb21lbnQgaW4gVVRDLCB0aGVuIGdlbmVyYXRlIHRleHQgcmVwcmVzZW50aW5nIHRoYXQgdmFsdWUgaW4gc3RhbmRhcmQgSVNPIDg2MDEgdXNpbmcgdGhlIGBaYCBvZmZzZXQtaW5kaWNhdG9yLgogICAgU3RyaW5nIG91dHB1dFogPSAKICAgICAgICBJbnN0YW50CiAgICAJLm5vdygpCgkJL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