import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import java.util.Locale;
public class Main {
public static void main
(String[] args
) { // Given date-time string
String dateTimeString
= "9/25/2020, 12:46:00 PM";
DateTimeFormatter dtf = new DateTimeFormatterBuilder()
.parseCaseInsensitive()
.appendPattern("M/d/u, h:m:s a")
// Convert the given date-time string to LocalDateTime
LocalDateTime ldt = LocalDateTime.parse(dateTimeString, dtf);
// Convert to LocalDateTime Instant if required
Instant instant = ldt.toInstant(ZoneOffset.UTC);
}
}
aW1wb3J0IGphdmEudGltZS5JbnN0YW50OwppbXBvcnQgamF2YS50aW1lLkxvY2FsRGF0ZVRpbWU7CmltcG9ydCBqYXZhLnRpbWUuWm9uZU9mZnNldDsKaW1wb3J0IGphdmEudGltZS5mb3JtYXQuRGF0ZVRpbWVGb3JtYXR0ZXI7CmltcG9ydCBqYXZhLnRpbWUuZm9ybWF0LkRhdGVUaW1lRm9ybWF0dGVyQnVpbGRlcjsKaW1wb3J0IGphdmEudXRpbC5Mb2NhbGU7CgpwdWJsaWMgY2xhc3MgTWFpbiB7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKSB7CgkJLy8gR2l2ZW4gZGF0ZS10aW1lIHN0cmluZwoJCVN0cmluZyBkYXRlVGltZVN0cmluZyA9ICI5LzI1LzIwMjAsIDEyOjQ2OjAwIFBNIjsKCgkJRGF0ZVRpbWVGb3JtYXR0ZXIgZHRmID0gbmV3IERhdGVUaW1lRm9ybWF0dGVyQnVpbGRlcigpCgkJCQkJCQkJLnBhcnNlQ2FzZUluc2Vuc2l0aXZlKCkKCQkJCQkJCQkuYXBwZW5kUGF0dGVybigiTS9kL3UsIGg6bTpzIGEiKQoJCQkJCQkJCS50b0Zvcm1hdHRlcihMb2NhbGUuRU5HTElTSCk7CgoJCS8vIENvbnZlcnQgdGhlIGdpdmVuIGRhdGUtdGltZSBzd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