Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

265
Views
Jackson is changing date to one day old in spring boot rest application.

I have created a simple application with spring boot 1.5.2. I am passing date and already mentioned the date format in application.properties file as follwoing : spring.jackson.joda-date-time-format=yyyy-MM-dd

But while calling the rest rest service using any client for POST(Insert) or PUT(Update), date is changing to on day old. Example 2017-03-21 will change to 2017-03-20.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I had the same issue and I solved it in that way: In your entitiy, add theses annotations:

@Temporal(TemporalType.DATE)
@JsonFormat(shape = JsonFormat.Shape.STRING, locale = "fr-FR", timezone = "Europe/Paris")
private Date yourDate;

Or you can add theses line to application.properties file:

spring.jackson.time-zone=Europe/Paris
spring.jackson.locale=fr_FR

If you are in another country you can change locale and timezone, but even if you keep France, it will work.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!