title: Hibernate with Java 8 LocalDate & LocalDateTime in Database
body: <p>My requirement is to store all dates &amp; date-times in UTC timezone in the database. I am using Java 8's <code>LocalDate</code> &amp; <code>LocalDateTime</code> in my Hibernate entities. </p>
  
  <p>Is that correct as <code>LocalDate</code> &amp; <code>LocalDateTime</code> doesn't have timezone associated with them?</p>
  
  <p>If not, should I fall back to using good old (or legacy?) <code>Date</code> &amp; <code>Timestamp</code>? </p>
  
  <p>Or should I be using Java 8's <code>Instant</code>? If using <code>Instant</code>, will there be a possibility to store only the date part, without time?</p>
  
  <p>The database is MySQL &amp; SQL Server and this is a Spring Boot application.</p>