Create Java DateTime Instant from microseconds
long timeMicros = 1_565_245_051_795_306L; Instant i = Instant.EPOCH.plus(timeMicros, ChronoUnit.MICROS); System.out.println(i); Output is: 2019-08-08T06:17:31.795306Z Edit: Rather than dividing and multiplying to convert microseconds to milliseconds and/or seconds I preferred to use the built-in support for microseconds. Also when explicitly adding them to the epoch feels a little hand-held. You already know how to convert Instant to … Read more