val dateFormatter= DateTimeFormatterBuilder()
.appendPattern("yyyy-MM-dd")
.toFormatter()
val begin = (LocalDateTime.parse("2019-11-04", dateFormatter).atOffset(ZoneOffset.UTC)
.toInstant()).atZone(ZoneId.of(timeZoneIdentifier))
When I try to parse the date like this, i get the following error:
Text '2019-11-04' could not be parsed: Unable to obtain LocalDateTime from TemporalAccessor: DateTimeBuilder[, ISO, null, 2019-11-04, null], type org.threeten.bp.format.DateTimeBuilder