tplink切片任务:切片时间还原为1小时(之前是测试1分钟)
This commit is contained in:
parent
e770be5094
commit
ccc41e1eba
|
|
@ -49,9 +49,7 @@ public class TplinkUploadJob implements Job {
|
||||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||||
log.info("tplink切片上传定时任务,执行时间:{}", DateUtils.now());
|
log.info("tplink切片上传定时任务,执行时间:{}", DateUtils.now());
|
||||||
//拿到前一小时的开始和结束时间
|
//拿到前一小时的开始和结束时间
|
||||||
// LocalDateTime lastHour = LocalDateTime.now().minusHours(1);
|
LocalDateTime lastHour = LocalDateTime.now().minusHours(1);
|
||||||
//todo 把这里改一下
|
|
||||||
LocalDateTime lastHour = LocalDateTime.now().minusDays(2);
|
|
||||||
//开始时间
|
//开始时间
|
||||||
ZonedDateTime startTimeZone = lastHour.withMinute(0).withSecond(0).withNano(0)
|
ZonedDateTime startTimeZone = lastHour.withMinute(0).withSecond(0).withNano(0)
|
||||||
.atZone(ZoneId.of("Asia/Shanghai"));
|
.atZone(ZoneId.of("Asia/Shanghai"));
|
||||||
|
|
@ -59,8 +57,7 @@ public class TplinkUploadJob implements Job {
|
||||||
long startMillis = startTimeZone.toInstant().toEpochMilli();
|
long startMillis = startTimeZone.toInstant().toEpochMilli();
|
||||||
|
|
||||||
//结束时间
|
//结束时间
|
||||||
//todo 把这里改一下
|
ZonedDateTime endTimeZone = lastHour.withMinute(59).withSecond(59).withNano(0)
|
||||||
ZonedDateTime endTimeZone = lastHour.withMinute(1).withSecond(59).withNano(0)
|
|
||||||
.atZone(ZoneId.of("Asia/Shanghai"));
|
.atZone(ZoneId.of("Asia/Shanghai"));
|
||||||
Date endTime = Date.from(endTimeZone.toInstant());
|
Date endTime = Date.from(endTimeZone.toInstant());
|
||||||
long endMillis = endTimeZone.toInstant().toEpochMilli();
|
long endMillis = endTimeZone.toInstant().toEpochMilli();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue