Getting time from database in UTC does not work as timestamp.

Description

Hello,

I was looking for something like the jira ticket but you said that it won't be fixed.

Here is my issue:

I have a database in postgresql with a table with a field in TIME and an other in TIMESTAMP.
These fields can be updated with whatever source because it has not timezone. We only consider that all date/time format in the database is in UTC.
When I get these fields values in my application, the TIME field (converted to LocalTime) has a weird value.
My spring boot application has set :
spring.jpa.properties.hibernate.jdbc.time_zone=UTC

In database :
I have my TIME field set at 07:00:00
My TIMESTAMP field set at 2019-05-20 18:25:14.815742

When I get the entity in my java application, I have
the entity LocalTime (from TIME field) set at 08:00:00
the entity LocalDateTime (from TIMESTAMP field) set at 2019-05-20 20:25:14.815742

There is my question : Why does the TIMESTAMP field correctly converted (+2 hours in my case) and why does the TIME field get a weird conversion (+1 hour).

What should we do in that case ?

Environment

Hibernate 5.37 postgresql 10 java 8

Status

Assignee

Unassigned

Reporter

ZHU You

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure