I have a requirement where if ISO date time does not specify zone offset, I should assume Europe/Bratislava's current offset.
Basically "2020-03-26T22:47:32.497" -> "2020-03-26T22:47:32.497+01:00"
Tldr; do parse time zone id if there is one, but default to a specific one if none is present
What I have now
private val isoDateTimeParser = DateTimeFormatterBuilder()
.append(DateTimeFormatter.ISO_OFFSET_DATE_TIME)
.parseDefaulting(ChronoField...?)
.toFormatter()
Obviously it doesnt work. Is it even possible? Should I just have 2 formatters (one with tz, one without) and try one after another?