/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.time.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
Ideone app = new Ideone();
app.doIt();
}
public void doIt() {
ZoneOffset offset = ZoneOffset.ofHours( -7 );
OffsetDateTime odt = OffsetDateTime.now( offset );
String output1
= odt.
toLocalTime().
toString(); System.
out.
println( "Current time in " + offset
+ ": " + output1
);
ZoneId denverTimeZone = ZoneId.of( "America/Denver" );
ZonedDateTime zdt = ZonedDateTime.now( denverTimeZone );
String output2
= zdt.
toLocalTime().
toString(); System.
out.
println( "Current time in " + denverTimeZone
+ ": " + output2
); }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnRpbWUuKjsKCi8qIE5hbWUgb2YgdGhlIGNsYXNzIGhhcyB0byBiZSAiTWFpbiIgb25seSBpZiB0aGUgY2xhc3MgaXMgcHVibGljLiAqLwpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJSWRlb25lIGFwcCA9IG5ldyBJZGVvbmUoKTsKCQlhcHAuZG9JdCgpOwoJfQoJCglwdWJsaWMgdm9pZCBkb0l0KCkgewoJCVpvbmVPZmZzZXQgb2Zmc2V0ID0gWm9uZU9mZnNldC5vZkhvdXJzKCAtNyApOwoJCU9mZnNldERhdGVUaW1lIG9kdCA9IE9mZnNldERhdGVUaW1lLm5vdyggb2Zmc2V0ICk7CgkJU3RyaW5nIG91dHB1dDEgPSBvZHQudG9Mb2NhbFRpbWUoKS50b1N0cmluZygpOwoJCVN5c3RlbS5vdXQucHJpbnRsbiggIkN1cnJlbnQgd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