From 5ef142c8bd32404f328ad428e46c4c8c3512918e Mon Sep 17 00:00:00 2001 From: Mark Peek Date: Tue, 6 Oct 2015 16:45:30 -0700 Subject: [PATCH] Fixes #2777: isotime interpolation uses InitTime --- template/interpolate/funcs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/interpolate/funcs.go b/template/interpolate/funcs.go index 75e1344ed..92c3ce5c4 100644 --- a/template/interpolate/funcs.go +++ b/template/interpolate/funcs.go @@ -93,14 +93,14 @@ func funcGenEnv(ctx *Context) interface{} { func funcGenIsotime(ctx *Context) interface{} { return func(format ...string) (string, error) { if len(format) == 0 { - return time.Now().UTC().Format(time.RFC3339), nil + return InitTime.Format(time.RFC3339), nil } if len(format) > 1 { return "", fmt.Errorf("too many values, 1 needed: %v", format) } - return time.Now().UTC().Format(format[0]), nil + return InitTime.Format(format[0]), nil } }