Timezone ignored in webform submittedAt time

Describe the problem/error/question

The time in the submittedAt value of a webform output is always in UTC. I have the env var set to my timezone, and also set the workflow timezone manually to test. My Timezone in this case is +10.

What is the error message (if any)?

None

Please share your workflow

Share the output returned by the last node

[
{
"Meeting Name": "Test Meeting",
"Hour": 8,
"Minute": 30,
"AM-PM": "AM",
"submittedAt": "2024-05-24T21:48:45.272Z",
"formMode": "test"
}
]

Information on your n8n setup

  • n8n version: 1.42.1
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: Ubuntu Server 22.04

Hi @revilo951

May I ask how you have set the env variable?

Also, did you configure any timezone setting for your docker container?

Hi @ria

I set the env variable in my docker-compose:

    environment:
      - GENERIC_TIMEZONE="Australia/Sydney"   

I also set the timezone in the settings for the individual workflow, no change.

In a shell in the container, the time is correct for my timezone.

Try without the quotes :upside_down_face:

image

Well that’s a little embarrassing - I actually have it without the quotes. I didn’t have access to my compose file, so googled the syntax for docker-compose env vars.

We’re still at square one, I’m afraid.

What happens if you completely remove your docker timezone settings?

Do you get the same result when testing and in production environment?

Same with production and testing.

Same with or without the env vars.

I’m still getting submittedAt returned in Zulu, when I need my own time zone.

image

Is this one a bug? Happy to submit a bug report, if that helps.

Hi @revilo951

I just want to make sure, you have the docker variable TZ=Australia/Sydney set right in the n8n env variables as well, yeah?

And did you stop and start the container again rather than doing a restart? (Also cleared your browser cache?)

Hi @ria

Yep, TZ=Australia/Sydney is set too.

I’ve tested the changes with both docker-compose up -d and docker-compose up -d --force-recreate. The issues persist across multiple browsers, so it’s not browser cache either.

Hi @ria

Did you get any further with this one?

I’m not sure what your local timezone is, but in the example where you tested it, it looks to me like the submittedAt for you was also returned in Zulu (UTC), and not the specified timezone?

On another note - it looks like there’s an error with the timezones for Australia


Hobart, Melbourne, and Sydney should all be +10, only during daylight saving are they +11.

Hi @revilo951
So sorry for the delayed response! :bowing_woman:

You are right, the timezone settings appear to have no effect on the submittedAt value from the form node output.

We are currently investigating this internally.

Will keep you posted! :pray: