I'm having a problem converting date from 10/15/2017 (start of daylight savings time)
My mapping looks like this:
@Column(nullable = false)
@NotNull
@DateTimeFormat(pattern = "dd/MM/yyyy")
private Date dataVisita;
When processing the request, I get the following error:
Failed To Convert Property Value Of Type Java.Lang.String To Required Type Java.Util.Date For Property DataVisita; Nested Exception Is Org.Springframework.Core.Convert.ConversionFailedException: Failed To Convert From Type Java.Lang.String To Type @ Javax.Persistence.Column @ Javax.Validation.Constraints.NotNull @ Org.Springframework.Format.Annotation.DateTimeFormat Java.Util.Date For Value 10/15/2017; Nested Exception Is Java.Lang.IllegalArgumentException: Can not Parse "10/15/2017": Illegal Instant Due To Time Zone Offset Transition (America / Sao_Paulo)
I understand that the error informs me that the date 10/15/2017 00:00:00 does not exist. What I wanted the application to do was auto-transform for 10/15/2017 01:00:00
Is there any way to override the implementation of @DateTimeFormat to reimplement parse?
Thank you