I actually have an issue with dates when they are called from an endpoint :
The date returned is one hour before UTC+1
But on the database the date is correct (UTC+1)
And when debugging the date from my object is also correct (UTC+1)
I have the following setUp :
Main.java :
@SpringBootApplication
@Slf4j
public class Main extends SpringBootServletInitializer
{
@PostConstruct
void started() {
TimeZone.setDefault(TimeZone.getTimeZone("Europe/Paris"));
}
I have set Hibernate to the following timezone :
application.properties :
spring.jpa.properties.hibernate.jdbc.time_zone = Europe/Paris
I get the correct date before posting it :
Date from database (took 4 minutes to post because the programm was on pause) :
Date from postman when calling endpoint
Anyone has any idea on why the date when returned throught an endpoint seems to be a GMT ?