n8n GENERIC_TIMEZONE environment value not applying correctly
By default n8n uses America/New York timezone, this is used by scheduling nodes and also shows as the selected timezone in each workflows settings: "Default:America/New York" is what is says.
To change this you set the required timezone as an environment variable. This should get teh schedule/cron nodes running atthe correct time, change the default workflow timezone etc.
I have tried every variation I can think of but cannot get it to apply correctly when running n8n in tipi.
I have set it these ways:
- directly in the docker-compose.yml for n8n-1
- as a reference in the yml to the app.env
- using a user-config yml and app.env both coded directly into the yml or again referencing the .env
It appears the timezone is applying for the schedule nodes and when using now() it is returning in the correct timezone. But the workflow time default value will not change, which makes me quesiton where else it is not applying.
I have a post on n8n community running as well to see if I can get any input there - https://community.n8n.io/t/timezone-setting-doesnt-take-effect/63400
n8n Community
Timezone setting doesn't take effect
Describe the problem/error/question I am trying to get n8n setup in runtipi, adding the GENERIC_TIMEZONE= to the environment part of the docker compose file. Have tried 3 different zones, Australia/Melbourne, Australia/Sydney and just for laughs a random one in America. The issue stays the same, in settings for a workflow the timezone still just...
28 Replies
i forgot to mention that I am restarting the app after any changes and have also tried reseting the app.
user-config is the way to go. Can you show us your created files ?
Would be my try in user-config .this is only the specific line, not the complete compose, since I am on mobile
This should apply the tz from tipi
services:
n8n-1:
environment:
- GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
that is the full docker compose in user config n8n-1 folder. and i have added a sperate app.env with the required value labelled as GENERIC_TIMEZONE and also tried adding it to the main env file. i will try referencing the eixstint TZ value now
lol the "-" changed to a dot point
ok tested using tz reference instead. no change. thank you for the suggestion though. as i mentioned for most things it seems to be applying so i might just get over it and manually set the part that isn't applying in each workflow
i just get fixated when something doesn't do what it is meant to and i cant figure out why
i will test as well for science 🙂
that would be awesome.. i would love it to be something i have done wrong. this is my first time setting up runtipi and i am also not super well versed in docker... but i did extensive reading and my expertise and work is in tech so i am pretty confident i did it all correctly.. but i have banged my head againts this partiuclar wall to exhaustion prior to posting.. im out of ideas with the knowledge i have.
user-config docker-compose.yml:
runtipi/user-config/n8n-1/docker-compose.yml
docker inspect:
the tz seems to be in the container. where do see that n8n did not adapt the tz?
in the app i created a test schedule trigger
this shows the correct time for me
Go into a workflow and click the three dots up top right and click settings
i see.
Yep
but maybe this is not a setting coming from the env var?
In my cloudron hosted instance of n8n that I am replacing when I change the environment timezone it changes that value in the workflow settings page
https://docs.n8n.io/hosting/configuration/configuration-examples/time-zone/
but that should be the case
Set the self-hosted instance timezone | n8n Docs
Change the default timezone for your self-hosted n8n instance.
Sorry didn't quite follow that?
the n8n doc says the tz from the env should be used in a workflow as default, which is not what is happening
brb 10 min
No worries.
I'm actually about to head to sleep seeing as it's midnight here.
Tomorrow I will spin up an empty VM and just install docker and test it in there... It could be a bug with the docker version of n8n and nothing to do with tipi's wrapper
I was hoping to get some traction on my post over on n8n forum but nothing so far
Anyway if you figure anything g out or need any info or tests done by me just post em here and I will check in the morning. I appreciate you checking it out.
P.s if we get this working do you know how I submit a change suggestion to have the n8n default docker compose include the reference to the tipi timezone?
i think i got it
i used the current official image - i suppose there was a bug.
@Stavros @Nicolas is there a reason n8n has no updates for a while now?
Yeahhhhh
It's because of renovate updating the deprecated version
@Nicolas I don't remember how the logic works with deprecated. If we bump the tipi version while an app is deprecated will it show as an update?
Yes it because renovate tries to update both at the same time
And we don't want to update the deprecated one
Well this has quickly gone beyond my knowledge.
Can I just manually maintain which version I'm using my specifying it as @InfBoumcyCastle did above and just changing the version number when I want to upgrade?
Just use my docker compose from above with the image
Yea I can do that, but I'm just thinking ahead for when n8n gets more updates, do I just change that number and restart?
Normally apps in the app store get updates automatically.
So in case n8n gets an update then you remove the image line
Ok I can do that. And if it doesn't get an update and I want to manually update I can just specify the newer version?
Is there any value in me trying to understand above what was meant as the reason it wasn't getting updates?
Thanks again for working it out and for the help
- yes
- not necessarily
Perfect, works for me. appreciate it