On client side, i use dd/MM/yyyy date format. The field use a twitter bootstrap 3 datetime picker (https://eonasdan.github.io/bootstrap-datetimepicker/)
I enter via twitter bootstrap 3 datetime picker 24/07/2015
in my json i sent, i see: birthdate: "24/07/2015"
In my dto, i do
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd/MM/yyyy")
private Date birthdate;
When i receive the date on the server, in my dto see: 23/07/2015 19:00
One day is lost.
Any explication?
See Question&Answers more detail:os