From f074b5578c01da814597150f295f902f6ce22da3 Mon Sep 17 00:00:00 2001 From: Azareal Date: Sun, 22 Mar 2020 12:20:13 +1000 Subject: [PATCH] fix account tmpls breaking due to time elapsed changes --- common/template_init.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/template_init.go b/common/template_init.go index 6bb177be..d9b691c5 100644 --- a/common/template_init.go +++ b/common/template_init.go @@ -16,6 +16,7 @@ import ( p "github.com/Azareal/Gosora/common/phrases" tmpl "github.com/Azareal/Gosora/common/templates" qgen "github.com/Azareal/Gosora/query_gen" + "github.com/Azareal/Gosora/uutils" ) var Ctemplates []string // TODO: Use this to filter out top level templates we don't need @@ -743,7 +744,8 @@ func initDefaultTmplFuncMap() { } fmap["elapsed"] = func(startedAtInt interface{}) interface{} { - return time.Since(startedAtInt.(time.Time)).String() + //return time.Since(startedAtInt.(time.Time)).String() + return time.Duration(uutils.Nanotime() - startedAtInt.(int64)).String() } fmap["lang"] = func(phraseNameInt interface{}) interface{} {