Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

273
Vistas
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.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

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.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda