I have to do some date manipulations [cringe] and I am trying to use ZonedDateTime for all its neat methods. My timestamp is in Unix time (epoch), and my API level is 16, how do I go about it?
For those using API 26+, the ZonedDateTime can be initiated using the class Instant, as such:
long timestamp = 1234567890;
Instant i = Instant.ofEpochSecond(timestamp);
ZonedDateTime z = ZonedDateTime.ofInstant(i, ZoneOffset.UTC);