0

I use spring rest and jackson 2.6.1

I have a url like

So from the client this url (with startDate=13/10/2015) /rest/appointments?

@RequestMapping(value = "/appointments", method = RequestMethod.GET)
public List<AppointmentInformationDto> getAllAppointmentsFromDate(@RequestParam(value = "startDate")  Date startDate) {
        ...
}

Date i receive is 2016 january 10. Not really the same date entered.

robert trudel
  • 5,283
  • 17
  • 72
  • 124
  • The server is likely configured to assume `MM/DD/YYYY`, reading it as the 10th day of the 13th month of 2015 (rolling over to January 2016). Possibly of interest: [how do I set the default locale for my JVM?](http://stackoverflow.com/questions/8809098/how-do-i-set-the-default-locale-for-my-jvm) – Jonathan Lonowski Oct 20 '15 at 01:49
  • i prefer a solution with a converter if it's possible – robert trudel Oct 20 '15 at 02:02

0 Answers0