/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.time.*;
import java.util.concurrent.TimeUnit;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
String input
= "2015/10/25".
replace( "/" ,
"-" ); LocalDate ld = LocalDate.parse( input );
long millisOfDay
= Long.
parseLong( "930" ); long nanosOfDay = TimeUnit.MILLISECONDS.toNanos( millisOfDay ); // Same effect as: ( millisOfDay * 1_000L )
LocalTime lt = LocalTime.ofNanoOfDay( nanosOfDay );
ZoneId z = ZoneId.of( "Pacific/Auckland" );
ZonedDateTime zdt = ZonedDateTime.of( ld , lt , z );
System.
out.
println( "ld: " + ld
); System.
out.
println( "lt: " + lt
); System.
out.
println( "zdt: " + zdt
);
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnRpbWUuKjsKaW1wb3J0IGphdmEudXRpbC5jb25jdXJyZW50LlRpbWVVbml0OwoKLyogTmFtZSBvZiB0aGUgY2xhc3MgaGFzIHRvIGJlICJNYWluIiBvbmx5IGlmIHRoZSBjbGFzcyBpcyBwdWJsaWMuICovCmNsYXNzIElkZW9uZQp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQlTdHJpbmcgaW5wdXQgPSAiMjAxNS8xMC8yNSIucmVwbGFjZSggIi8iICwgIi0iICk7CiAgICAJTG9jYWxEYXRlIGxkID0gTG9jYWxEYXRlLnBhcnNlKCBpbnB1dCApOwogICAgCQoJCWxvbmcgbWlsbGlzT2ZEYXkgPSBMb25nLnBhcnNlTG9uZyggIjkzMCIgKTsKICAgIAlsb25nIG5hbm9zT2ZEYXkgPSBUaW1lVW5pdC5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