From d7f1325ace4be5d7517ddb61c1a9f44307db595c Mon Sep 17 00:00:00 2001 From: Asaf Gartner Date: Thu, 13 Oct 2022 19:58:28 +0300 Subject: [PATCH] Better time truncation for stream notifications. --- src/discord/streams.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/discord/streams.go b/src/discord/streams.go index 0cfa039..c16b934 100644 --- a/src/discord/streams.go +++ b/src/discord/streams.go @@ -165,7 +165,7 @@ func PostStreamHistory(ctx context.Context, history *models.TwitchStreamHistory) if history.EndApproximated { approximated = "about " } - duration := history.EndedAt.Sub(history.StartedAt).Truncate(time.Minute).String() + duration := history.EndedAt.Sub(history.StartedAt).Truncate(time.Second).String() messageContent := fmt.Sprintf( ":o: **%s** was live: https://twitch.tv/%s\n> _%s_\nOn for %s%s", history.TwitchLogin,