import java.time.LocalTime;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Locale;
public class Main {
public static void main
(String[] args
) { // Test
System.
out.
println(timeConversion
("10/22/2021 10:05:39PM")); }
public static LocalDateTime timeConversion
(String s
) { DateTimeFormatter dtfInput
= DateTimeFormatter.
ofPattern("MM/dd/yyyy[ h:m:sa]",
Locale.
ENGLISH); LocalDateTime time = LocalDateTime.parse(s, dtfInput);
return time;
// DateTimeFormatter dtfOutput = DateTimeFormatter.ofPattern("HH:mm:ss", Locale.ENGLISH);
// return time.format(dtfOutput);
}
}
aW1wb3J0IGphdmEudGltZS5Mb2NhbFRpbWU7CmltcG9ydCBqYXZhLnRpbWUuTG9jYWxEYXRlVGltZTsKaW1wb3J0IGphdmEudGltZS5mb3JtYXQuRGF0ZVRpbWVGb3JtYXR0ZXI7CmltcG9ydCBqYXZhLnV0aWwuTG9jYWxlOwoKcHVibGljIGNsYXNzIE1haW4gewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgewoJCS8vIFRlc3QKCQlTeXN0ZW0ub3V0LnByaW50bG4odGltZUNvbnZlcnNpb24oIjEwLzIyLzIwMjEgMTA6MDU6MzlQTSIpKTsKCX0KCglwdWJsaWMgc3RhdGljIExvY2FsRGF0ZVRpbWUgdGltZUNvbnZlcnNpb24oU3RyaW5nIHMpIHsKCQlEYXRlVGltZUZvcm1hdHRlciBkdGZJbnB1dCA9IERhdGVUaW1lRm9ybWF0dGVyLm9mUGF0dGVybigiTU0vZGQveXl5eVsgaDptOnNhXSIsIExvY2FsZS5FTkdMSVNIKTsKCQlMb2NhbERhdGVUaW1lIHRpbWUgPSBMb2NhbERhdGVUaW1lLnBhcnNlKHMsIGR0ZklucHV0KTsKcmV0dXJuIHRpbWU7CgkvLwlEYXRlVGltZUZvcm1hdHRlciBkdGZPdXRwdXQgPSBEYXRlVGltZUZvcm1hdHRlci5vZlBhdHRlcm4oIkhIOm1tOnNzIiwgTG9jYWxlLkVOR0xJU0gpOwoJLy8JcmV0dXJuIHRpbWUuZm9ybWF0KGR0Zk91dHB1dCk7Cgl9Cn0=