Avoid unnecessary use of Instant.toEpochMilli