The solution env TZ='Europe/Amsterdam' node server.js
from @uhef works in cases where your app doesn't work with forked process, but when you are working with forked process, specially when you launch your app with a building tool like gulp , the command gulp
will take the env values, but the process created by gulp not (your app).
To solve this, you have to do:
$ export TZ="Europe/Amsterdam"; gulp myTask
This will set the TZ
environment variable for all the process started in the console you are working on, included all the subsequents process executed after the gulp command in the same console without the need to execute them with the prefix export TZ="Europe/Amsterdam";
again.