2
以下是应用delcaration JSON文件如何更改时区将PM2日志
{
"apps" : [{
"name" : "test_v2",
"script" : "bin/www",
"log_date_format" : "YYYY-MM-DD HH:mm Z",
"ignore_watch" : ["[\\/\\\\]\\./", "node_modules"],
"watch" : true,
"node_args" : "--harmony",
"cwd" : "/root/src/test_v2",
"env": {
"NODE_ENV": "production",
"AWESOME_SERVICE_API_TOKEN": "xxx",
"TZ": "America/Los_Angeles"
}
}]
}
要更改时区,我曾跟随截至https://github.com/Unitech/pm2/issues/560
评论,但它不工作。行为与认为“TZ”不存在的行为相同。我甚至努力将时区编码为数字值,如“+08:00”,这不起作用。如何更改日志中的时区。