0
I’m having a problem converting date of day 15/10/2017 (start of daylight saving time)
My mapping is like this:
@Column(nullable = false)
@NotNull
@DateTimeFormat(pattern = "dd/MM/yyyy")
private Date dataVisita;
While 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 Datavisit; 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 15/10/2017; Nested Exception Is Java.lang.Illegalargumentexception: Cannot Parse "15/10/2017": Illegal Instant Due To Time Zone Offset Transition (America/Sao_paulo)
I understand that the error informs me that the date 15/10/2017 00:00:00 does not exist. What I wanted the application to perform was the automatic transformation to 15/10/2017 01:00:00
Is there any way to override the @Datetimeformat implementation to reimplement parse?
Thank you