//假如是时间戳 "createTimeLong": 1679287522749,long createTimeLong = Long.parseLong(axl800TestResByExamTO.getCreateTimeLong());
// 将时间戳转换为Instant对象Instant instant = Instant.ofEpochMilli(createTimeLong);
// 转换为LocalDateTime对象LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, ZoneId.systemDefault());examBiometry.setCheckTime(localDateTime);
如果是 其他样式的
//tection_day":"22/03/14","detection_time":"13:01:34",String detectionDay = to.getDetection_day();String detectionTime = to.getDetection_time();// 将日期和时间拼接在一起String combinedDateTime = detectionDay + " " + detectionTime;DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yy/MM/dd HH:mm:ss");LocalDateTime checkTime = LocalDateTime.parse(combinedDateTime, formatter);examDiopter.setCheckTime(checkTime);