From 119fee49afcf8ef68d9c98fba81443ed5acb3b20 Mon Sep 17 00:00:00 2001 From: ehlxr Date: Mon, 11 Nov 2019 09:32:36 +0800 Subject: [PATCH] update at 2019-11-11 09:32:36 by ehlxr --- log.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log.go b/log.go index 7c07d78..1728a2f 100644 --- a/log.go +++ b/log.go @@ -242,7 +242,7 @@ func (lc *logConfig) fileWriteSyncer(fileName string) zapcore.WriteSyncer { } // Rotating log files daily - runner := cron.New(cron.WithSeconds(), cron.WithLocation(time.UTC)) + runner := cron.New(cron.WithSeconds(), cron.WithLocation(time.Local)) _, _ = runner.AddFunc("0 0 0 * * ?", func() { _ = writer.Rotate(time.Now().AddDate(0, 0, -1)) })