Java LocalDateTime转Date

Date startDate = Date.from(startLocalDateTime.toInstant(ZoneOffset.of("+8")));
Date endDate = Date.from(endLocalDateTime.toInstant(ZoneOffset.of("+8")));

你可能感兴趣的:(Java)