import java.time.LocalDateTime;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
import java.util.Locale;
public class Main {
public static void main
(String[] args
) {
DateTimeFormatter dtf
= DateTimeFormatter.
ofPattern("M/d/u h:ma",
Locale.
UK); LocalDateTime ldtSource = LocalDateTime.parse(date + " " + time, dtf);
OffsetDateTime odtSource = ldtSource.atOffset(ZoneOffset.UTC);
OffsetDateTime odtTarget = odtSource.withOffsetSameInstant(ZoneOffset.of("+08:00"));
System.
out.
println(odtTarget
);
// In a custom format
System.
out.
println(odtTarget.
format(dtf
)); }
}
aW1wb3J0IGphdmEudGltZS5Mb2NhbERhdGVUaW1lOwppbXBvcnQgamF2YS50aW1lLk9mZnNldERhdGVUaW1lOwppbXBvcnQgamF2YS50aW1lLlpvbmVPZmZzZXQ7CmltcG9ydCBqYXZhLnRpbWUuZm9ybWF0LkRhdGVUaW1lRm9ybWF0dGVyOwppbXBvcnQgamF2YS51dGlsLkxvY2FsZTsKCnB1YmxpYyBjbGFzcyBNYWluIHsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpIHsKCQlTdHJpbmcgZGF0ZSA9ICI5LzEzLzIwMTIiOwoJCVN0cmluZyB0aW1lID0gIjU6NDhwbSI7CgoJCURhdGVUaW1lRm9ybWF0dGVyIGR0ZiA9IERhdGVUaW1lRm9ybWF0dGVyLm9mUGF0dGVybigiTS9kL3UgaDptYSIsIExvY2FsZS5VSyk7CgkJTG9jYWxEYXRlVGltZSBsZHRTb3VyY2UgPSBMb2NhbERhdGVUaW1lLnBhcnNlKGRhdGUgKyAiICIgKyB0aW1lLCBkdGYpOwoKCQlPZmZzZXREYXRlVGltZSBvZHRTb3VyY2UgPSBsZHRTb3VyY2UuYXRPZmZzZXQoWm9uZU9mZnNldC5VVEMpOwoJCU9mZnNldERhdGVUaW1lIG9kdFRhcmdldCA9IG9kdFNvdXJjZS53aXRoT2Zmc2V0U2FtZUluc3RhbnQoWm9uZU9mZnNldC5vZigiKzA4OjAwIikpOwoKCQlTeXN0ZW0ub3V0LnByaW50bG4ob2R0VGFyZ2V0KTsKCgkJLy8gSW4gYSBjdXN0b20gZm9ybWF0CgkJU3lzdGVtLm91dC5wcmludGxuKG9kdFRhcmdldC5mb3JtYXQoZHRmKSk7Cgl9Cn0=