/* 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
{
{
// Or, Instant.now() for current moment in UTC.
Instant instant = Instant.parse( "2017-01-23T12:34:56.123456789Z" ) ;
ZoneId z = ZoneId.of( "Asia/Singapore" ) ;
ZonedDateTime zdt = instant.atZone( z ) ; // Same simultaneous moment, same point on the timeline.
System.
out.
println( "instant.toString(): " + instant
) ; System.
out.
println( "zdt.toString(): " + zdt
) ; }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgppbXBvcnQgamF2YS50aW1lLiogOwoKLyogTmFtZSBvZiB0aGUgY2xhc3MgaGFzIHRvIGJlICJNYWluIiBvbmx5IGlmIHRoZSBjbGFzcyBpcyBwdWJsaWMuICovCmNsYXNzIElkZW9uZQp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCiAgICAgICAgLy8gT3IsIEluc3RhbnQubm93KCkgZm9yIGN1cnJlbnQgbW9tZW50IGluIFVUQy4KICAgICAgICBJbnN0YW50IGluc3RhbnQgPSBJbnN0YW50LnBhcnNlKCAiMjAxNy0wMS0yM1QxMjozNDo1Ni4xMjM0NTY3ODlaIiApIDsKICAgICAgICBab25lSWQgeiA9IFpvbmVJZC5vZiggIkFzaWEvU2luZ2Fwb3JlIiApIDsKICAgICAgICBab25lZERhdGVUaW1lIHpkdCA9IGluc3RhbnQuYXRab25lKCB6ICkgOyAgLy8gU2FtZSBzaW11bHRhbmVvdXMgbW9tZW50LCBzYW1lIHBvaW50IG9uIHRoZSB0aW1lbGluZS4KCiAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCAiaW5zdGFudC50b1N0cmluZygpOiAiICsgaW5zdGFudCApIDsKICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oICJ6ZHQudG9TdHJpbmcoKTogIiArIHpkdCApIDsKCX0KfQ==