From edacff123bcb0706a9c18c0112e23176e837d1d0 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 12 Oct 2022 22:13:07 +0800 Subject: [PATCH] Add UTC in the serverTimezone dropdown --- server/client.js | 1 - server/model/maintenance.js | 5 ++--- src/components/settings/General.vue | 1 + src/util.ts | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/server/client.js b/server/client.js index bed2ba03..ef96c7f4 100644 --- a/server/client.js +++ b/server/client.js @@ -8,7 +8,6 @@ const server = UptimeKumaServer.getInstance(); const io = server.io; const { setting } = require("./util-server"); const checkVersion = require("./check-version"); -const dayjs = require("dayjs"); /** * Send list of notification providers to client diff --git a/server/model/maintenance.js b/server/model/maintenance.js index d1197009..a507f870 100644 --- a/server/model/maintenance.js +++ b/server/model/maintenance.js @@ -1,6 +1,5 @@ const { BeanModel } = require("redbean-node/dist/bean-model"); const { parseTimeObject, parseTimeFromTimeObject, utcToLocal, localToUTC, log } = require("../../src/util"); -const { isArray } = require("chart.js/helpers"); const { timeObjectToUTC, timeObjectToLocal } = require("../util-server"); const { R } = require("redbean-node"); const dayjs = require("dayjs"); @@ -48,11 +47,11 @@ class Maintenance extends BeanModel { obj.timeslotList.push(await timeslot.toPublicJSON()); } - if (!isArray(obj.weekdays)) { + if (!Array.isArray(obj.weekdays)) { obj.weekdays = []; } - if (!isArray(obj.daysOfMonth)) { + if (!Array.isArray(obj.daysOfMonth)) { obj.daysOfMonth = []; } diff --git a/src/components/settings/General.vue b/src/components/settings/General.vue index 57c8e0ca..0b8ce83f 100644 --- a/src/components/settings/General.vue +++ b/src/components/settings/General.vue @@ -26,6 +26,7 @@ {{ $t("Server Timezone") }}