N8n Output Timezone Mismatch with Expression and Cron Timezone

Hi everyone,

For some reason, my outputs don’t match up with my timezone (Australia/Sydney + 11 GMT)

The expression has been generated as follows:

My set-up:

  • n8n set-up on private server (via digitalocean)
  • Timezone on n8n server set correctly via the .env file (Cron time works as expected)

Any thoughts on how to fix this?

The value of config “GENERIC_TIMEZONE” would be respected by the Cron node, but not by JavaScript code
You should set both TZ and GENERIC_TIMEZONE together
Like this :

- TZ=${GENERIC_TIMEZONE}
4 Likes

Great, many thanks - where should you add that entry exactly. In the .env file or perhaps the docker-config.yml?

I put that in my docker-config.yml

1 Like

Perfect - thank you. How do you reboot docker so that it takes effect; can’t seem to see it working in n8n yet, but suspect because i need to reboot/restart docker

I assume you are using docker-compose, me too~
I use following command to restart n8n

docker-compose down
docker-compose up -d
2 Likes

Ah lovely - thank you! And it works!

2 Likes

Glad it helps, cheers !