import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import java.util.Locale;
class Main {
public static void main
(String[] args
) { String strDateTime
= "2023-01-09T23:51:44.595Z"; DateTimeFormatter offsetFormatter = new DateTimeFormatterBuilder()
.appendLiteral("UTC ")
.appendOffset("+H:mm", "+0")
ZoneOffset zoneOffset = offsetFormatter.parse(utcOffset, ZoneOffset::from);
OffsetDateTime odtGiven = OffsetDateTime.parse(strDateTime);
OffsetDateTime odtDesired = odtGiven.withOffsetSameLocal(zoneOffset)
.withOffsetSameInstant(zoneOffset.UTC);
System.
out.
println(odtDesired
); }
}
aW1wb3J0IGphdmEudGltZS5PZmZzZXREYXRlVGltZTsKaW1wb3J0IGphdmEudGltZS5ab25lT2Zmc2V0OwppbXBvcnQgamF2YS50aW1lLmZvcm1hdC5EYXRlVGltZUZvcm1hdHRlcjsKaW1wb3J0IGphdmEudGltZS5mb3JtYXQuRGF0ZVRpbWVGb3JtYXR0ZXJCdWlsZGVyOwppbXBvcnQgamF2YS51dGlsLkxvY2FsZTsKCmNsYXNzIE1haW4gewogICAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgewogICAgICAgIFN0cmluZyBzdHJEYXRlVGltZSA9ICIyMDIzLTAxLTA5VDIzOjUxOjQ0LjU5NVoiOwogICAgICAgIFN0cmluZyB1dGNPZmZzZXQgPSAiVVRDICs2IjsKICAgICAgICBEYXRlVGltZUZvcm1hdHRlciBvZmZzZXRGb3JtYXR0ZXIgPSBuZXcgRGF0ZVRpbWVGb3JtYXR0ZXJCdWlsZGVyKCkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuYXBwZW5kTGl0ZXJhbCgiVVRDICIpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmFwcGVuZE9mZnNldCgiK0g6bW0iLCAiKzAiKQogICAgICAgICAgICAgICAg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