@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
cannot convert UTC without milliseconds to java.util.Date
#32856
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Affects: 3.1.2
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
cannot convert ISO date strings to aDate
object if there are no decimals on the second (nanoseconds).Eg in a
GetMapping
likeCalling
"/?date=2024-05-13T16:10:00.000Z"
is fine.Calling
"/?date=2024-05-13T16:10:00Z"
causes the following exception:However, if converting to an
OffsetDateTime
object instead, both calls from above are fine, where both dates convert without problemsThe text was updated successfully, but these errors were encountered: