1

I am sending a json request in restful API having a date field (java.util.date in the POJO class), apart from other fields

{
"name" : "abcd";
"enDdate" : "2016-11-28"
}

The response i can see in the server logs is one day less than the sent one. i.e 28th nov is displayed as 27th Nov and so on. The server is hosted in U.S time zone In the POJO, i am handling in a below manner

@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd",locale = "en-US", timezone = "America/Phoenix")
private Date endDate;

I want date to be displayed properly in the logs without any time zones being coded explicitly i.e irrespective of any time zones. is it possible ?

Can anyone please help.

user2326831
  • 151
  • 2
  • 14

0 Answers0