LocalDate 转Instant:

LocalDate now = LocalDate.now();
Instant start = now.atStartOfDay(ZoneId.systemDefault()).toInstant();

LocalTime 转Instant

LocalTime time = LocalTime.now();
Instant instant = time..atDate(LocalDate.now()).atZone(ZoneId.systemDefault()).toInstant();

首先将时间转为LocalDateTime ,然后转为ZonedDateTime ,最后转为Instant