mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
logger: fix UTC time func
Fixes #719 Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -140,7 +140,9 @@ func GetLogger() *zerolog.Logger {
|
|||||||
func SetLogTime(utc bool) {
|
func SetLogTime(utc bool) {
|
||||||
zerolog.TimeFieldFormat = dateFormat
|
zerolog.TimeFieldFormat = dateFormat
|
||||||
if utc {
|
if utc {
|
||||||
zerolog.TimestampFunc = time.Now().UTC
|
zerolog.TimestampFunc = func() time.Time {
|
||||||
|
return time.Now().UTC()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
zerolog.TimestampFunc = time.Now
|
zerolog.TimestampFunc = time.Now
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user