update at 2019-11-11 09:32:36 by ehlxr

master
ehlxr 2019-11-11 09:32:36 +08:00
parent a2a63aebee
commit 119fee49af
1 changed files with 1 additions and 1 deletions

2
log.go
View File

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