diff --git a/packages/server/src/utils/notifications/build-error.ts b/packages/server/src/utils/notifications/build-error.ts index 3c4fd73d..5406698d 100644 --- a/packages/server/src/utils/notifications/build-error.ts +++ b/packages/server/src/utils/notifications/build-error.ts @@ -28,6 +28,7 @@ export const sendBuildErrorNotifications = async ({ adminId, }: Props) => { const date = new Date(); + const unixDate = ~~((Number(date)) / 1000); const notificationList = await db.query.notifications.findMany({ where: and( eq(notifications.appBuildError, true), @@ -79,12 +80,12 @@ export const sendBuildErrorNotifications = async ({ }, { name: "`📅`・Date", - value: date.toLocaleDateString(), + value: ``, inline: true, }, { name: "`⌚`・Time", - value: date.toLocaleTimeString(), + value: ``, inline: true, }, { diff --git a/packages/server/src/utils/notifications/build-success.ts b/packages/server/src/utils/notifications/build-success.ts index 0e09e87d..1c16b10d 100644 --- a/packages/server/src/utils/notifications/build-success.ts +++ b/packages/server/src/utils/notifications/build-success.ts @@ -26,6 +26,7 @@ export const sendBuildSuccessNotifications = async ({ adminId, }: Props) => { const date = new Date(); + const unixDate = ~~((Number(date)) / 1000); const notificationList = await db.query.notifications.findMany({ where: and( eq(notifications.appDeploy, true), @@ -77,12 +78,12 @@ export const sendBuildSuccessNotifications = async ({ }, { name: "`📅`・Date", - value: date.toLocaleDateString(), + value: ``, inline: true, }, { name: "`⌚`・Time", - value: date.toLocaleTimeString(), + value: ``, inline: true, }, { diff --git a/packages/server/src/utils/notifications/database-backup.ts b/packages/server/src/utils/notifications/database-backup.ts index 717c965f..6d3dcb28 100644 --- a/packages/server/src/utils/notifications/database-backup.ts +++ b/packages/server/src/utils/notifications/database-backup.ts @@ -26,6 +26,7 @@ export const sendDatabaseBackupNotifications = async ({ errorMessage?: string; }) => { const date = new Date(); + const unixDate = ~~((Number(date)) / 1000); const notificationList = await db.query.notifications.findMany({ where: and( eq(notifications.databaseBackup, true), @@ -85,12 +86,12 @@ export const sendDatabaseBackupNotifications = async ({ }, { name: "`📅`・Date", - value: date.toLocaleDateString(), + value: ``, inline: true, }, { name: "`⌚`・Time", - value: date.toLocaleTimeString(), + value: ``, inline: true, }, { diff --git a/packages/server/src/utils/notifications/docker-cleanup.ts b/packages/server/src/utils/notifications/docker-cleanup.ts index e8bbc6db..7a836329 100644 --- a/packages/server/src/utils/notifications/docker-cleanup.ts +++ b/packages/server/src/utils/notifications/docker-cleanup.ts @@ -15,6 +15,7 @@ export const sendDockerCleanupNotifications = async ( message = "Docker cleanup for dokploy", ) => { const date = new Date(); + const unixDate = ~~((Number(date)) / 1000); const notificationList = await db.query.notifications.findMany({ where: and( eq(notifications.dockerCleanup, true), @@ -50,12 +51,12 @@ export const sendDockerCleanupNotifications = async ( fields: [ { name: "`📅`・Date", - value: date.toLocaleDateString(), + value: ``, inline: true, }, { name: "`⌚`・Time", - value: date.toLocaleTimeString(), + value: ``, inline: true, }, { diff --git a/packages/server/src/utils/notifications/dokploy-restart.ts b/packages/server/src/utils/notifications/dokploy-restart.ts index c552e269..86cd6f03 100644 --- a/packages/server/src/utils/notifications/dokploy-restart.ts +++ b/packages/server/src/utils/notifications/dokploy-restart.ts @@ -12,6 +12,7 @@ import { export const sendDokployRestartNotifications = async () => { const date = new Date(); + const unixDate = ~~((Number(date)) / 1000); const notificationList = await db.query.notifications.findMany({ where: eq(notifications.dokployRestart, true), with: { @@ -39,12 +40,12 @@ export const sendDokployRestartNotifications = async () => { fields: [ { name: "`📅`・Date", - value: date.toLocaleDateString(), + value: ``, inline: true, }, { name: "`⌚`・Time", - value: date.toLocaleTimeString(), + value: ``, inline: true, }, {