Hello, i need some help with Date class. It comes from an old project that has to be upgraded to springboot for the REST controller part WITHOUT CHANGING ANY OTHER CODE. So every "Date" has to stay as Date, sadly.
I found a problem when i retrieve the date from DB it has -2hours diff. So i made a controller to test it:
@GetMapping("testing")
public Date testDate(@RequestParam @DateTimeFormat(pattern="yyyy-MM-dd")Date date){
return date;
}
i pass "2023-06-27" and i receive "2023-06-26T22:00:00.000+00:00"
How can i solve this? Remember, can't change any single Date to LocalDate or whatever