From 5933ac3669831e381a0a612ce8d999d0e9e4c6d8 Mon Sep 17 00:00:00 2001 From: mritd Date: Tue, 11 Sep 2018 16:28:12 +0800 Subject: [PATCH] feat(changeLog): add Location add Location Signed-off-by: mritd --- pkg/gcrsync/git.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/gcrsync/git.go b/pkg/gcrsync/git.go index 4a8a81b..a4f5b1b 100644 --- a/pkg/gcrsync/git.go +++ b/pkg/gcrsync/git.go @@ -54,7 +54,8 @@ func (g *Gcr) Commit(images []string) { utils.CheckAndExit(err) defer chgLog.Close() - updateInfo := fmt.Sprintf("### %s Update:\n\n", time.Now().Format("2006-01-02 15:04:05")) + loc, _ := time.LoadLocation("Asia/Shanghai") + updateInfo := fmt.Sprintf("### %s Update:\n\n", time.Now().In(loc).Format("2006-01-02 15:04:05")) for _, imageName := range images { updateInfo += "- " + fmt.Sprintf(GcrRegistryTpl, g.NameSpace, imageName) + "\n" }