java - Seconds since epoch to LocalDate in Joda -
how convert seconds past epoch localdate
in joda?
e.g.
long seconds = 1468608443l; ? localdate.fromseconds(seconds); // not exist
what exist fromdatefields
, fromcalendar
.
is necessary convert seconds 1 of these 2 things first?
alternately can make instant
with
instant instant = new instant(seconds * 1000);
then try converting date
or datetime
input localdate
. standard way accomplish this?
best method far:
instant instant = new instant(seconds * 1000); localdate date = instant.todatetime(some_time_zone).tolocaldate();
Comments
Post a Comment