I have an external API that returns me dates as long
s, represented as milliseconds since the beginning of the Epoch.
With the old style Java API, I would simply construct a Date
from it with
Date myDate = new Date(startDateLong)
What is the equivalent in Java 8's LocalDate
/LocalDateTime
classes?
I am interested in converting the point in time represented by the long
to a LocalDate
in my current local timezone.
java.util.Date
was never really a date in the way thatLocalDate
is - it was an instant in time as well. – Carminajava.util.Date
intoLocalDate
– BlaineblaineyFile.lastModified()
(epoch millis) toLocalDate(Time)
. – Galore