Fix commit's time (#18375) (#18392)

- Backport of #18375
This commit is contained in:
Gusted 2022-01-25 05:48:56 +00:00 committed by GitHub
parent b68e605d56
commit 0b83cc21be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -75,7 +75,11 @@
<pre class="commit-body" style="display: none;">{{RenderCommitBody .Message $commitRepoLink $.Repository.ComposeMetas}}</pre>
{{end}}
</td>
<td class="text right aligned">{{TimeSince .Author.When $.Lang}}</td>
{{if .Committer}}
<td class="text right aligned">{{TimeSince .Committer.When $.Lang}}</td>
{{else}}
<td class="text right aligned">{{TimeSince .Author.When $.Lang}}</td>
{{end}}
</tr>
{{end}}
</tbody>

View File

@ -34,7 +34,7 @@
</span>
{{end}}
</th>
<th class="text grey right age">{{if .LatestCommit}}{{if .LatestCommit.Author}}{{TimeSince .LatestCommit.Author.When $.Lang}}{{end}}{{end}}</th>
<th class="text grey right age">{{if .LatestCommit}}{{if .LatestCommit.Committer}}{{TimeSince .LatestCommit.Committer.When $.Lang}}{{end}}{{end}}</th>
</tr>
</thead>
<tbody>