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> <pre class="commit-body" style="display: none;">{{RenderCommitBody .Message $commitRepoLink $.Repository.ComposeMetas}}</pre>
{{end}} {{end}}
</td> </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> </tr>
{{end}} {{end}}
</tbody> </tbody>

View file

@ -34,7 +34,7 @@
</span> </span>
{{end}} {{end}}
</th> </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> </tr>
</thead> </thead>
<tbody> <tbody>