From d23cb0b382fdd828d08b6aaacab0ee499f758fb7 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Mon, 8 May 2023 04:08:30 +0800 Subject: [PATCH] Fix maintenance do not start after 1.21.2 --- server/model/maintenance.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/model/maintenance.js b/server/model/maintenance.js index 787953fb8..43f826b3a 100644 --- a/server/model/maintenance.js +++ b/server/model/maintenance.js @@ -290,7 +290,7 @@ class Maintenance extends BeanModel { } getRunningTimeslot() { - let start = dayjs(this.beanMeta.job.nextRun(dayjs().add(-this.duration, "second").format("YYYY-MM-DD HH:mm:ss"))); + let start = dayjs(this.beanMeta.job.nextRun(dayjs().add(-this.duration, "second").toDate())); let end = start.add(this.duration, "second"); let current = dayjs();