1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2024-12-24 22:14:47 +02:00

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";