Fix template function DateTime (#24317)

Before, 500 error


![image](https://user-images.githubusercontent.com/2114189/234170176-403ffd1b-ec27-42be-bff9-86184dc8d74d.png)
This commit is contained in:
wxiaoguang authored and GitHub committed 2023-04-25 15:48:30 -04:00
1 parent 9219534447
commit 0e8045d8ea
33 files changed
+140 -60

No files matched your search

@@ -22,7 +22,7 @@
<td><a href="{{.FullWebLink}}">{{.Version.Version}}</a></td>
<td><a href="{{.Creator.HomeLink}}">{{.Creator.Name}}</a></td>
<td>{{FileSize .CalculateBlobSize}}</td>
<td>{{DateTime "short" .Version.CreatedUnix.FormatLong .Version.CreatedUnix.FormatShort}}</td>
<td>{{DateTime "short" .Version.CreatedUnix}}</td>
</tr>
{{else}}
<tr>
+1 -1
View File
@@ -86,7 +86,7 @@
{{range .LatestVersions}}
<div class="item gt-df">
<a class="gt-f1" href="{{$.PackageDescriptor.PackageWebLink}}/{{PathEscape .LowerVersion}}">{{.Version}}</a>
<span class="text small">{{DateTime "short" (.CreatedUnix.FormatDate) (.CreatedUnix.FormatDate)}}</span>
<span class="text small">{{DateTime "short" .CreatedUnix}}</span>
</div>
{{end}}
</div>