Reputation: 3601
When using Hibernate only application using property like hibernate.jdbc.time_zone
helps me to save all date formats in my desired timezone example UTC.
How to achieve the same using spring boot jpa with minimal or no code change? Is there some property to add in application.properties
Upvotes: 1
Views: 500
Reputation: 117
In your application.properties you can specify Hibernate properties by prefixing them with spring.jpa.properties. like this:
spring.jpa.properties.hibernate.jdbc.time_zone=UTC
Upvotes: 1
Reputation: 24591
You can configure Jackson timezone for deserialization via this configuration:
spring.jackson.time-zone=UTC
Upvotes: 0
Reputation: 1869
By adding hibernate as your jpa implementation, then you can define provider specific settings in configuration file.
Upvotes: 0