Add UTC in the serverTimezone dropdown

This commit is contained in:
Louis Lam 2022-10-12 22:13:07 +08:00
parent 2faf866e9e
commit edacff123b
4 changed files with 3 additions and 5 deletions

View file

@ -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

View file

@ -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 = [];
}

View file

@ -26,6 +26,7 @@
{{ $t("Server Timezone") }}
</label>
<select id="timezone" v-model="settings.serverTimezone" class="form-select">
<option value="UTC">UTC</option>
<option
v-for="(timezone, index) in timezoneList"
:key="index"

View file

@ -9,7 +9,6 @@
import * as dayjs from "dayjs";
import * as timezone from "dayjs/plugin/timezone";
import * as utc from "dayjs/plugin/utc";
import {R} from "redbean-node";
export const isDev = process.env.NODE_ENV === "development";
export const appName = "Uptime Kuma";