Commit 0d0cb1f9 authored by suhuiguang's avatar suhuiguang

1.时区差8小时需修改

parent 988dab8b
...@@ -62,6 +62,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest; ...@@ -62,6 +62,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZoneOffset; import java.time.ZoneOffset;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -864,7 +865,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -864,7 +865,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
private long calculateExpirationTime() { private long calculateExpirationTime() {
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
LocalDateTime nextDay = now.plus(1, ChronoUnit.DAYS).withHour(0).withMinute(0).withSecond(0).withNano(0); LocalDateTime nextDay = now.plus(1, ChronoUnit.DAYS).withHour(0).withMinute(0).withSecond(0).withNano(0);
return nextDay.toInstant(ZoneOffset.of("+0")).toEpochMilli(); return nextDay.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment