From 340612ec10c06ebbccc0a39fe327b8309de79b6e Mon Sep 17 00:00:00 2001 From: Nick Misasi Date: Tue, 10 May 2022 13:55:21 -0400 Subject: [PATCH] Divide TrialEnd date by 1000 to account for it being in ms (#20173) Co-authored-by: Mattermod --- app/cloud.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/cloud.go b/app/cloud.go index b4cd6c3bfd..2d26806c0e 100644 --- a/app/cloud.go +++ b/app/cloud.go @@ -53,7 +53,8 @@ func (a *App) SendUpgradeConfirmationEmail() *model.AppError { } // Build readable trial end date - endTimeStamp := subscription.TrialEndAt + // Trial end is passed as unix timestamp in ms + endTimeStamp := subscription.TrialEndAt / 1000 t := time.Unix(endTimeStamp, 0) trialEndDate := fmt.Sprintf("%s %d, %d", t.Month(), t.Day(), t.Year())