Without setting the @RequestParam to String, what is the best way to ultimately support up to a ZonedDateTime, but not require the request to contain a Time or Zone/Offset?
I would like to enable the request to support formats like '2021-05-10T01:10:00.000Z' and also '2021-05-10'. In the case of just a date, I would like to defined a default time and zone if missing.
Current code looks like this
@RequestParam(required=false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
ZonedDateTime startDate, @RequestParam(required=false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) ZonedDateTime endDate)