The documentation of the java.time package says:
Many applications can be written only using LocalDate, LocalTime and Instant, with the time-zone added at the user interface (UI) layer.
The offset-based date-time types OffsetTime and OffsetDateTime, are intended primarily for use with network protocols and database access.
So if I want to save some date-time of an event in a database, e.g. the time a post comment was added to the system, should I use OffsetDateTime, not ZonedDateTime and Instant? Or maybe I should use LocalDateTime or Instant? Does it depend on the database access technology, e.g. whether I use Hibernate or JDBC?
Are there any rules when to use OffsetDateTime, ZonedDateTime and Instant in database applications?
The summary of the java.time package is not clear for me.