I user hibernate+spring+mysql 5.7. When I save date 20/04/1939, it stores correctly in database.
@Column(name = "birth_date")
@Temporal(TemporalType.DATE)
private Date birthDate;
the value stored in database after save is 1939-04-20.
when i display it using
person.getBirthDate()
it displays 19/04/1939. It is not related with my formatting. The value it retrieves from db is one day less.
It is always showing 1 day less when i use year 1939 with any date. So what's wrong here? Also for other years, dates are showing perfectly.