Fixes #2777: isotime interpolation uses InitTime

This commit is contained in:
Mark Peek 2015-10-06 16:45:30 -07:00
parent 2411c779d1
commit 5ef142c8bd
1 changed files with 2 additions and 2 deletions

View File

@ -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
}
}