cerca

lean forum software (pmc local branch)
Log | Files | Refs | README | LICENSE

commit 795f0e4da489848399eb3fe21dd59c111b703296
parent 243d273fada353c498aefd3deb1daea67689f182
Author: Nat Welch <nat@natwelch.com>
Date:   Wed, 12 Jan 2022 02:01:41 +0000

fix imports

Diffstat:
Mserver/server.go | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/server/server.go b/server/server.go @@ -4,17 +4,18 @@ import ( "context" "errors" "fmt" + "html/template" "net/http" "net/url" "strconv" "strings" "syscall" + "time" "cerca/crypto" "cerca/database" "cerca/server/session" "cerca/util" - "html/template" "github.com/carlmjohnson/requests" ) @@ -106,13 +107,13 @@ func wrapViews() []string { var ( templates = template.Must(template.ParseFiles(wrapViews()...)) templateFuncs = template.FuncMap{ - "formatDateTime": func(dt time.Time) string { + "formatDateTime": func(t time.Time) string { return t.Format("2006-01-02 15:04:05") }, - "formatDateTimeRFC3339": func(dt time.Time) string { + "formatDateTimeRFC3339": func(t time.Time) string { return t.Format(time.RFC3339Nano) }, - "formatDate": func(dt time.Time) string { + "formatDate": func(t time.Time) string { return t.Format("2006-01-02") }, }