0

In my spring based web application, I am using spring and jackson jar for converting json-object conversion. Here I am facing a problem , one of my bean has a field java.util.Timestamp registerDate.

From the form (using angular js )I am setting value as 2016-01-22 22:30:00. But in my controller the field value changed to different one that is 2016-01-22 12:30:00.

Mateusz Sroka
  • 2,255
  • 2
  • 17
  • 19
Anoop M Nair
  • 1,057
  • 1
  • 13
  • 31

1 Answers1

1

Since the problem here is your timezone, what you can do is send the browser timezone (get client time zone from browser) along with your form data and in your server you can calculate the appropriate time in your controller. Another option is that you can simply pass the date as a String and then convert it when needed.

Community
  • 1
  • 1
Limit
  • 458
  • 7
  • 19