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

- Backport of #18375
This commit is contained in:
Gusted 2022-01-25 21:50:02 +00:00 committed by GitHub
parent f7f4129f52
commit d60b5f1e89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -76,7 +76,11 @@
<pre class="commit-body" style="display: none;">{{RenderCommitBody .Message $.RepoLink $.Repository.ComposeMetas}}</pre>
{{end}}
</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

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