[Bug] different locale when using .weekdayLong in expression in preview and output

Describe the problem/error/question

The preview shows german word for weekday, the output is english.
Locale is Europe/Berlin.

Information on your n8n setup

  • n8n version: current
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: ubuntu

Hi there,

Are you sure the locale of the server is set right? can you show us?
As the default is newyork or somehting like that, so an execution would use that but the preview is done by the browser so that is done with your browser’s locale settings. (most likely the same as ur pc)

the timezone in n8n is set Europe/Berlin
locale of the Ubuntu server is set to de_DE
grafik

the docker container I’m unsure.

which one of these is used for the preview vs. the actual results idk.

Ok then you need to set the ENV variable of the n8n container to the correct locale :slight_smile:

2 Likes

You can also set the locale directly in the node with Luxon
{{ DateTime.fromISO($json.Zeit.start).setLocale("DE").toFormat("EEEE") }}
image

1 Like

setting the
N8N_DEFAULT_LOCALE to ‘de’ or ‘de-DE’

doesn’t affect the output as shown below.

Not sure what ENV variable to set exactly I think there were 2.
Should be some more topics on that on the forum though.