From bcd48cd8caa42f9b8414c16d47e0cd4d910d3ea9 Mon Sep 17 00:00:00 2001 From: Prasad Ghangal Date: Sun, 3 Jan 2021 15:14:18 +0530 Subject: [PATCH] Fix notification timestsamp in Discord (#442) ##### ISSUE TYPE - Bug fix Pull Request ##### SUMMARY Use correct timestamp in Discord event notification Fixes #441 ##### Test plan ![image](https://user-images.githubusercontent.com/7098659/103475090-43be1880-4dd0-11eb-9a5c-2406d2d4f954.png) --- pkg/notify/discord.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/notify/discord.go b/pkg/notify/discord.go index 53d871884..f7cfd3dbc 100644 --- a/pkg/notify/discord.go +++ b/pkg/notify/discord.go @@ -29,7 +29,7 @@ import ( ) // customTimeFormat holds custom time format string -const customTimeFormat = "2006-01-02 15:04:05" +const customTimeFormat = "2006-01-02T15:04:05Z" var embedColor = map[config.Level]int{ config.Info: 8311585, // green @@ -110,7 +110,7 @@ func formatDiscordMessage(event events.Event, notifyType config.NotifType) disco } // Add timestamp - messageEmbed.Timestamp = event.TimeStamp.Format(customTimeFormat) + messageEmbed.Timestamp = event.TimeStamp.UTC().Format(customTimeFormat) messageEmbed.Color = embedColor[event.Level]