Pm2: Set timezone

Created on 8 Jul 2014  路  5Comments  路  Source: Unitech/pm2

Will be cool set timezone of application in the json config? For example:

{
    "apps" : [
        {
            "name"         : "Test",
            "timezone"     : "Europe/Amsterdam",
            "script"       : "./app.js",
            "exec_mode"    : "cluster_mode"
        }
    ]
}

And pm2 make this inside:

process.env.TZ = 'Europe/Amsterdam';

All 5 comments

Put that through env in the json file : https://github.com/Unitech/pm2#json-app-declaration

 "env": {
        "TZ": "Europe/Amsterdam"
    }

yes im use this now. But only was a idea if will be cool set as param in config file and pm2 make this internally.

but it does not work now :
set as : TZ: "Asia/Shanghai"
format in log file: 2017-08-14 23:51:20 -04:00:
OS: centos 7
@soyuka

same question

Agree, this does not work on Windows either

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mario-mui picture mario-mui  路  3Comments

rangercyh picture rangercyh  路  4Comments

morfies picture morfies  路  3Comments

rajendar38 picture rajendar38  路  3Comments

FujiHaruka picture FujiHaruka  路  3Comments