/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.time.LocalDateTime;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.time.ZoneId;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
System.
out.
println(date.
getTime());
LocalDateTime dateTime = LocalDateTime.now();
Date date2
= Date.
from(dateTime.
atZone(ZoneId.
of("America/Sao_Paulo")).
toInstant()); System.
out.
println(date2.
getTime());
String str
= "1986-04-08 12:30"; DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
LocalDateTime dateTime2 = LocalDateTime.parse(str, formatter);
Date date3
= Date.
from(dateTime2.
atZone(ZoneId.
of("Europe/London")).
toInstant()); System.
out.
println(date3.
getTime());
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnRpbWUuTG9jYWxEYXRlVGltZTsKaW1wb3J0IGphdmEudGltZS5ab25lZERhdGVUaW1lOwppbXBvcnQgamF2YS50aW1lLmZvcm1hdC5EYXRlVGltZUZvcm1hdHRlcjsKaW1wb3J0IGphdmEudGltZS5ab25lSWQ7CgoKCgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCQoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJRGF0ZSBkYXRlID0gbmV3IERhdGUoKTsKCQlTeXN0ZW0ub3V0LnByaW50bG4oZGF0ZS5nZXRUaW1lKCkpOwoJCQoJCVN5c3RlbS5vdXQucHJpbnR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