mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-25 09:00:27 +00:00
logger: fix UTC time func
Fixes #719 Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
1fccd05e9e
commit
ebbbf81e65
1 changed files with 3 additions and 1 deletions
|
@ -140,7 +140,9 @@ func GetLogger() *zerolog.Logger {
|
|||
func SetLogTime(utc bool) {
|
||||
zerolog.TimeFieldFormat = dateFormat
|
||||
if utc {
|
||||
zerolog.TimestampFunc = time.Now().UTC
|
||||
zerolog.TimestampFunc = func() time.Time {
|
||||
return time.Now().UTC()
|
||||
}
|
||||
} else {
|
||||
zerolog.TimestampFunc = time.Now
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue