I am able to parse 2019-01-25 14:34:34.123456789
string and get the object of ZonedDateTime
.
Now, I want to get time in nanoseconds precision level since epoch from this ZonedDateTime
object.
Duration might help:
Something like:
Duration.between(
ZonedDateTime.ofInstant(Instant.EPOCH, ZoneId.of("UTC")),
yourZonedDatetime
).toNanos()