I've faced the problem of receiving of date from front-end.
I send date from front-end in the format "2020-01-03T00:00:00+02:00"
to ZonedDateTime
object in back-end. But instead of 2020-01-03T00:00Z[UTC]
, I receive 2020-01-02T22:00Z[UTC]
(actualy minus 2 hours).
Question:
Is there any way to make ZonedDateTime lib not to convert to UTC, or not to minus timezone? Maybe any annotation?
Controller and object simple code example
Object that came from front-end:
@DIfferentsLombokAnnotations
public class Filters {
private ZonedDateTime startDate;
//Other fields
}
Controller:
@PostMapping("/ggg")
public List<ResponceObject> method(@RequestBody Filters filters) {
//any code
}