To process UTC dates in the database (for reading / writing), you can use this small open source DbAssist . It uses a custom UtcDateType to display java.util.Date fields in your entities, so that they are treated by Hibernate as UTC in the database. Since you are using JPA annotations, you should use the following dependency:
<dependency> <groupId>com.montrosesoftware</groupId> <artifactId>DbAssist-5.2.2</artifactId> <version>1.0-RELEASE</version> </dependency>
Applying the fix is easy, for example, when using Spring Boot, you need to make sure that you have the @EnableAutoConfiguration annotation before the application class. If you are using a different version of Hibernate, just go to the github wiki to find the correct patch version and installation guide. You can also learn more about the time zone shift issue in this article .
Wertr trotz
source share