diff --git a/server/notification-providers/discord.js b/server/notification-providers/discord.js
index b699228c9..37de0d364 100644
--- a/server/notification-providers/discord.js
+++ b/server/notification-providers/discord.js
@@ -59,8 +59,8 @@ class Discord extends NotificationProvider {
value: monitorJSON["type"] === "push" ? "Heartbeat" : address,
},
{
- name: "Time (UTC)",
- value: heartbeatJSON["time"],
+ name: `Time (${heartbeatJSON["timezone"]})`,
+ value: heartbeatJSON["localDateTime"],
},
{
name: "Error",
@@ -94,8 +94,8 @@ class Discord extends NotificationProvider {
value: monitorJSON["type"] === "push" ? "Heartbeat" : address,
},
{
- name: "Time (UTC)",
- value: heartbeatJSON["time"],
+ name: `Time (${heartbeatJSON["timezone"]})`,
+ value: heartbeatJSON["localDateTime"],
},
{
name: "Ping",
diff --git a/server/notification-providers/feishu.js b/server/notification-providers/feishu.js
index 73781ca4e..683a3653d 100644
--- a/server/notification-providers/feishu.js
+++ b/server/notification-providers/feishu.js
@@ -35,8 +35,7 @@ class Feishu extends NotificationProvider {
text:
"[Down] " +
heartbeatJSON["msg"] +
- "\nTime (UTC): " +
- heartbeatJSON["time"],
+ `\nTime (${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`
},
],
],
@@ -62,8 +61,7 @@ class Feishu extends NotificationProvider {
text:
"[Up] " +
heartbeatJSON["msg"] +
- "\nTime (UTC): " +
- heartbeatJSON["time"],
+ `\nTime (${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`,
},
],
],
diff --git a/server/notification-providers/line.js b/server/notification-providers/line.js
index e594e1742..10b7f2c9b 100644
--- a/server/notification-providers/line.js
+++ b/server/notification-providers/line.js
@@ -33,7 +33,10 @@ class Line extends NotificationProvider {
"messages": [
{
"type": "text",
- "text": "UptimeKuma Alert: [🔴 Down]\n" + "Name: " + monitorJSON["name"] + " \n" + heartbeatJSON["msg"] + "\nTime (UTC): " + heartbeatJSON["time"]
+ "text": "UptimeKuma Alert: [🔴 Down]\n" +
+ "Name: " + monitorJSON["name"] + " \n" +
+ heartbeatJSON["msg"] +
+ `\nTime (${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`
}
]
};
@@ -44,7 +47,10 @@ class Line extends NotificationProvider {
"messages": [
{
"type": "text",
- "text": "UptimeKuma Alert: [✅ Up]\n" + "Name: " + monitorJSON["name"] + " \n" + heartbeatJSON["msg"] + "\nTime (UTC): " + heartbeatJSON["time"]
+ "text": "UptimeKuma Alert: [✅ Up]\n" +
+ "Name: " + monitorJSON["name"] + " \n" +
+ heartbeatJSON["msg"] +
+ `\nTime (${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`
}
]
};
diff --git a/server/notification-providers/linenotify.js b/server/notification-providers/linenotify.js
index 8454152d8..279acb7d4 100644
--- a/server/notification-providers/linenotify.js
+++ b/server/notification-providers/linenotify.js
@@ -24,12 +24,18 @@ class LineNotify extends NotificationProvider {
await axios.post(lineAPIUrl, qs.stringify(testMessage), config);
} else if (heartbeatJSON["status"] === DOWN) {
let downMessage = {
- "message": "\n[🔴 Down]\n" + "Name: " + monitorJSON["name"] + " \n" + heartbeatJSON["msg"] + "\nTime (UTC): " + heartbeatJSON["time"]
+ "message": "\n[🔴 Down]\n" +
+ "Name: " + monitorJSON["name"] + " \n" +
+ heartbeatJSON["msg"] + "\n" +
+ `Time (${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`
};
await axios.post(lineAPIUrl, qs.stringify(downMessage), config);
} else if (heartbeatJSON["status"] === UP) {
let upMessage = {
- "message": "\n[✅ Up]\n" + "Name: " + monitorJSON["name"] + " \n" + heartbeatJSON["msg"] + "\nTime (UTC): " + heartbeatJSON["time"]
+ "message": "\n[✅ Up]\n" +
+ "Name: " + monitorJSON["name"] + " \n" +
+ heartbeatJSON["msg"] + "\n" +
+ `Time (${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`
};
await axios.post(lineAPIUrl, qs.stringify(upMessage), config);
}
diff --git a/server/notification-providers/lunasea.js b/server/notification-providers/lunasea.js
index 4d7136f75..0a5fea7b0 100644
--- a/server/notification-providers/lunasea.js
+++ b/server/notification-providers/lunasea.js
@@ -28,7 +28,9 @@ class LunaSea extends NotificationProvider {
if (heartbeatJSON["status"] === DOWN) {
let downdata = {
"title": "UptimeKuma Alert: " + monitorJSON["name"],
- "body": "[🔴 Down] " + heartbeatJSON["msg"] + "\nTime (UTC): " + heartbeatJSON["time"],
+ "body": "[🔴 Down] " +
+ heartbeatJSON["msg"] +
+ `\nTime (${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`
};
await axios.post(lunaseaurl, downdata);
return okMsg;
@@ -37,7 +39,9 @@ class LunaSea extends NotificationProvider {
if (heartbeatJSON["status"] === UP) {
let updata = {
"title": "UptimeKuma Alert: " + monitorJSON["name"],
- "body": "[✅ Up] " + heartbeatJSON["msg"] + "\nTime (UTC): " + heartbeatJSON["time"],
+ "body": "[✅ Up] " +
+ heartbeatJSON["msg"] +
+ `\nTime (${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`
};
await axios.post(lunaseaurl, updata);
return okMsg;
diff --git a/server/notification-providers/mattermost.js b/server/notification-providers/mattermost.js
index bade6c195..d4997392c 100644
--- a/server/notification-providers/mattermost.js
+++ b/server/notification-providers/mattermost.js
@@ -88,8 +88,8 @@ class Mattermost extends NotificationProvider {
statusField,
{
short: true,
- title: "Time (UTC)",
- value: heartbeatJSON.time,
+ title: `Time (${heartbeatJSON["timezone"]})`,
+ value: heartbeatJSON.localDateTime,
},
],
},
diff --git a/server/notification-providers/pushbullet.js b/server/notification-providers/pushbullet.js
index 1346655d0..f3d95a85e 100644
--- a/server/notification-providers/pushbullet.js
+++ b/server/notification-providers/pushbullet.js
@@ -29,14 +29,18 @@ class Pushbullet extends NotificationProvider {
let downData = {
"type": "note",
"title": "UptimeKuma Alert: " + monitorJSON["name"],
- "body": "[🔴 Down] " + heartbeatJSON["msg"] + "\nTime (UTC): " + heartbeatJSON["time"],
+ "body": "[🔴 Down] " +
+ heartbeatJSON["msg"] +
+ `\nTime (${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`,
};
await axios.post(pushbulletUrl, downData, config);
} else if (heartbeatJSON["status"] === UP) {
let upData = {
"type": "note",
"title": "UptimeKuma Alert: " + monitorJSON["name"],
- "body": "[✅ Up] " + heartbeatJSON["msg"] + "\nTime (UTC): " + heartbeatJSON["time"],
+ "body": "[✅ Up] " +
+ heartbeatJSON["msg"] +
+ `\nTime (${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`,
};
await axios.post(pushbulletUrl, upData, config);
}
diff --git a/server/notification-providers/pushover.js b/server/notification-providers/pushover.js
index e4f0ddb81..398063cbf 100644
--- a/server/notification-providers/pushover.js
+++ b/server/notification-providers/pushover.js
@@ -30,7 +30,7 @@ class Pushover extends NotificationProvider {
await axios.post(pushoverlink, data);
return okMsg;
} else {
- data.message += "\nTime (UTC):" + heartbeatJSON["time"];
+ data.message += `\nTime (${heartbeatJSON["timezone"]}):${heartbeatJSON["localDateTime"]}`;
await axios.post(pushoverlink, data);
return okMsg;
}
diff --git a/server/notification-providers/rocket-chat.js b/server/notification-providers/rocket-chat.js
index fb48ce1a6..76b964a3a 100644
--- a/server/notification-providers/rocket-chat.js
+++ b/server/notification-providers/rocket-chat.js
@@ -22,8 +22,6 @@ class RocketChat extends NotificationProvider {
return okMsg;
}
- const time = heartbeatJSON["time"];
-
let data = {
"text": "Uptime Kuma Alert",
"channel": notification.rocketchannel,
@@ -31,7 +29,7 @@ class RocketChat extends NotificationProvider {
"icon_emoji": notification.rocketiconemo,
"attachments": [
{
- "title": "Uptime Kuma Alert *Time (UTC)*\n" + time,
+ "title": `Uptime Kuma Alert *Time (${heartbeatJSON["timezone"]})*\n${heartbeatJSON["localDateTime"]}`,
"text": "*Message*\n" + msg,
}
]
diff --git a/server/notification-providers/slack.js b/server/notification-providers/slack.js
index da89f0f7a..12207bd4f 100644
--- a/server/notification-providers/slack.js
+++ b/server/notification-providers/slack.js
@@ -39,7 +39,6 @@ class Slack extends NotificationProvider {
return okMsg;
}
- const time = heartbeatJSON["time"];
const textMsg = "Uptime Kuma Alert";
let data = {
"text": `${textMsg}\n${msg}`,
@@ -65,7 +64,7 @@ class Slack extends NotificationProvider {
},
{
"type": "mrkdwn",
- "text": "*Time (UTC)*\n" + time,
+ "text": `*Time (${heartbeatJSON["timezone"]})*\n${heartbeatJSON["localDateTime"]}`,
}],
}
],
diff --git a/server/notification-providers/smtp.js b/server/notification-providers/smtp.js
index a6a0cc016..aae0e46c7 100644
--- a/server/notification-providers/smtp.js
+++ b/server/notification-providers/smtp.js
@@ -91,7 +91,7 @@ class SMTP extends NotificationProvider {
let bodyTextContent = msg;
if (heartbeatJSON) {
- bodyTextContent = `${msg}\nTime (UTC): ${heartbeatJSON["time"]}`;
+ bodyTextContent = `${msg}\nTime (${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`;
}
// send mail with defined transport object