From f3485c827b3c3f320a39d1895945f68123888220 Mon Sep 17 00:00:00 2001 From: Yarden Shoham <hrsi88@gmail.com> Date: Sat, 31 Dec 2022 19:11:47 +0000 Subject: [PATCH] Fix due date rendering a day ahead in issue Previously, the last minute of the chosen date caused bad timezone rendering. For example, I chose January 4th, 2023. ### Before ```html <time data-format="date" datetime="Wed, 04 Jan 2023 23:59:59 +0000">January 5, 2023</time> ``` ### After ```html <time data-format="date" datetime="2023-01-04">January 4, 2023</time> ``` Signed-off-by: Yarden Shoham <hrsi88@gmail.com> --- templates/repo/issue/view_content/sidebar.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index 63b99136a8ed5..6cb00fdd1d24b 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -413,7 +413,7 @@ <div class="df sb ac"> <div class="due-date tooltip {{if .Issue.IsOverdue}}text red{{end}}" {{if .Issue.IsOverdue}}data-content="{{.locale.Tr "repo.issues.due_date_overdue"}}"{{end}}> {{svg "octicon-calendar" 16 "mr-3"}} - <time data-format="date" datetime="{{.Issue.DeadlineUnix.FormatLong}}">{{.Issue.DeadlineUnix.FormatDate}}</time> + <time data-format="date" datetime="{{.Issue.DeadlineUnix.FormatDate}}">{{.Issue.DeadlineUnix.FormatDate}}</time> </div> <div> {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}