diff --git a/server/model/maintenance.js b/server/model/maintenance.js
index 43f826b3..f18eb026 100644
--- a/server/model/maintenance.js
+++ b/server/model/maintenance.js
@@ -47,7 +47,8 @@ class Maintenance extends BeanModel {
cron: this.cron,
duration: this.duration,
durationMinutes: parseInt(this.duration / 60),
- timezone: await this.getTimezone(),
+ timezone: await this.getTimezone(), // Only valid timezone
+ timezoneOption: this.timezone, // Mainly for dropdown menu, because there is a option "SAME_AS_SERVER"
timezoneOffset: await this.getTimezoneOffset(),
status: await this.getStatus(),
};
@@ -153,7 +154,7 @@ class Maintenance extends BeanModel {
bean.description = obj.description;
bean.strategy = obj.strategy;
bean.interval_day = obj.intervalDay;
- bean.timezone = obj.timezone;
+ bean.timezone = obj.timezoneOption;
bean.active = obj.active;
if (obj.dateRange[0]) {
@@ -316,7 +317,7 @@ class Maintenance extends BeanModel {
}
async getTimezone() {
- if (!this.timezone) {
+ if (!this.timezone || this.timezone === "SAME_AS_SERVER") {
return await UptimeKumaServer.getInstance().getTimezone();
}
return this.timezone;
diff --git a/src/pages/EditMaintenance.vue b/src/pages/EditMaintenance.vue
index 93082e4c..d3ec1737 100644
--- a/src/pages/EditMaintenance.vue
+++ b/src/pages/EditMaintenance.vue
@@ -203,8 +203,8 @@
-