update 时间戳的调整

develop
hhb@hotmail.com 4 months ago
parent fc53b9a31b
commit 93f4929922

@ -957,8 +957,9 @@ public class TeacherServiceImpl implements TeacherService {
try { try {
Instant instantSTime = Instant.ofEpochMilli(teacherDto.getStartTime()); Instant instantSTime = Instant.ofEpochMilli(teacherDto.getStartTime());
Instant instantETime = Instant.ofEpochMilli(teacherDto.getEndTime()); Instant instantETime = Instant.ofEpochMilli(teacherDto.getEndTime());
LocalDate localDateSTime = instantSTime.atZone(TimeZone.getDefault().toZoneId()).toLocalDate(); ZoneId zoneId = ZoneId.of("Asia/Shanghai");
LocalDate localDateETime = instantETime.atZone(TimeZone.getDefault().toZoneId()).toLocalDate(); LocalDate localDateSTime = instantSTime.atZone(zoneId).toLocalDate();
LocalDate localDateETime = instantETime.atZone(zoneId).toLocalDate();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String sTime = localDateSTime.format(formatter); String sTime = localDateSTime.format(formatter);
String eTime = localDateETime.format(formatter); String eTime = localDateETime.format(formatter);

Loading…
Cancel
Save