Skip to content

Commit bc97908

Browse files
committed
fix: [#664] resolve date mismatch between log file name and log entries
1 parent ee0bc55 commit bc97908

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

log/logger/daily.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (daily *Daily) Handle(channel string) (logrus.Hook, error) {
4444
logPath+"-%Y-%m-%d"+ext,
4545
rotatelogs.WithRotationTime(time.Duration(24)*time.Hour),
4646
rotatelogs.WithRotationCount(uint(daily.config.GetInt(channel+".days"))),
47-
rotatelogs.WithClock(rotatelogs.NewClock(carbon.Now().StdTime())),
47+
rotatelogs.WithClock(rotatelogs.NewClock(carbon.Now(daily.config.GetString("app.timezone")).StdTime())),
4848
)
4949
if err != nil {
5050
return hook, err

0 commit comments

Comments
 (0)