forked from farhoodlabs/paperclip
fix: use SYS: prefix in pino-pretty translateTime to honour TZ env var
pino-pretty's translateTime: "HH:MM:ss" formats all timestamps in UTC, ignoring the process TZ environment variable. Changing the prefix to "SYS:HH:MM:ss" instructs pino-pretty to format timestamps in the local system timezone, so operators running in non-UTC zones see correct wall-clock times in both the console and the server.log file. Fixes: #2879
This commit is contained in:
@@ -21,7 +21,7 @@ fs.mkdirSync(logDir, { recursive: true });
|
||||
const logFile = path.join(logDir, "server.log");
|
||||
|
||||
const sharedOpts = {
|
||||
translateTime: "HH:MM:ss",
|
||||
translateTime: "SYS:HH:MM:ss",
|
||||
ignore: "pid,hostname",
|
||||
singleLine: true,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user