I have a web service in java using Spring Boot, in a class I have an attribute of type date and I use JsonFormat to format the date and be able to convert on the client side, using Gson. However, even setting the locale for the zone of Brazil, which would be UTC-03, it converts to three hours more, making the date different. How do I resolve this issue?
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd-MM-yyyy HH:mm:ss", locale = "UTC-03")
private Date date;