How can I convert a number like this : 1467158498669 from à json file to java field of type : ZonedDateTime ?
Thank you !
You can use Instant.ofEpochMilli
long date = 1467158498669l;
ZonedDateTime zoneTime = Instant.ofEpochMilli(date).atZone(ZoneId.of("Canada/Atlantic"));
OR
ZonedDateTime zdt = ZonedDateTime.ofInstant(Instant.ofEpochMilli(date),
ZoneId.of("Canada/Atlantic"));