/* 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
{
{
String input
= "2018-02-13T10:20:12.120+0000".
replace( "+0000" ,
"+00:00" ); OffsetDateTime odt = OffsetDateTime.parse( input );
Instant instant = odt.toInstant();
ZoneId z = ZoneId.of( "America/Montreal" );
ZonedDateTime zdt = odt.atZoneSameInstant( z );
System.
out.
println( "odt.toString(): " + odt
); System.
out.
println( "instant.toString(): " + instant
); System.
out.
println( "zdt.toString(): " + zdt
);
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgoKaW1wb3J0IGphdmEudGltZS4qOwppbXBvcnQgamF2YS50aW1lLnRlbXBvcmFsLio7CmltcG9ydCBqYXZhLnRpbWUuZm9ybWF0Lio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoKU3RyaW5nIGlucHV0ID0gIjIwMTgtMDItMTNUMTA6MjA6MTIuMTIwKzAwMDAiLnJlcGxhY2UoICIrMDAwMCIgLCAiKzAwOjAwIiApOwpPZmZzZXREYXRlVGltZSBvZHQgPSBPZmZzZXREYXRlVGltZS5wYXJzZSggaW5wdXQgKTsKCkluc3RhbnQgaW5zdGFudCA9IG9kdC50b0luc3RhbnQoKTsKClpvbmVJZCB6ID0gWm9uZUlkLm9mKCAiQW1lcmljYS9Nb250cmVhbCIgKTsKWm9uZWREYXRlVGltZSB6ZHQgPSBvZHQuYXRab25lU2FtZUluc3RhbnQoIHogKTsKClN5c3RlbS5vdXQucHJpbnRsbiggIm9kdC50b1N0cmluZygpOiAiICsgb2R0ICk7ClN5c3RlbS5vdXQucHJpbnRsbiggImluc3RhbnQudG9TdHJpbmcoKTogIiArIGluc3RhbnQgKTsKU3lzdGVtLm91dC5wcmludGxuKCAiemR0LnRvU3RyaW5nKCk6ICIgKyB6ZHQgKTsKCgl9Cn0=