In my MySQL database I have a table with three columns like below
id | name | notification_time
-----------------
1 | name1 | 00:30:00
2 | name2 | 01:30:00
3 | name3 | 01:00:00
notification_time is a datatype of TIME.
In my Spring-boot app, to model the table I have
@Entity
@Table(name = "table")
public class TableEntity implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Integer id;
@Column(name = "name")
private String name;
@Column(name = "notification_time")
@Temporal(TemporalType.TIME)
private Date notificationTime;
And to retrieve the values I simply retrieve all entries through my repository
tableRepository.findAll();
When I retrieve the notification_time from the database, the value I see for each is
19:30:00
20:30:00
20:00:00
so it appears to being offsetting the time from the value in my table but 19 hours? I'd like to preserve the values from my table instead (ie 00:30:00, 01:30:00, 01:00:00). Is there a reason for this behavior, and a way to correct this?