Jackson @JsonFormat set date with one day less

Use this solution, it is more effective and modern than my solution: https://stackoverflow.com/a/45456037/4886918

Thanks @Benjamin Lucidarme.

I resolved my problem using:

@Temporal(TemporalType.DATE)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd/MM/yyyy", locale = "pt-BR", timezone = "Brazil/East")
private Date birthDate;

I changed timezone to “Brazil/East” or “America/Sao_Paulo” and working now

Thanks

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)