N8n and luxon date time

Describe the problem/error/question

Cannot $today or $now.
Date and time with Luxon | n8n Docs

What is the error message (if any)?

I get Invalid datetime
image

Please share your workflow

Share the output returned by the last node

N/A

Information on your n8n setup

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

Hey @yarlanda,

I have just given this a go and it appears to be working for me, I am not sure why it wouldn’t be working though. Can you share more on your docker configuration?

Hey @Jon

Here’s my compose file:

services:
  n8n:
    image: n8nio/n8n
    ports:
      - "5678:5678"
    environment:
      - N8N_PUSH_BACKEND=websocket
      - GENERIC_TIMEZONE="Indian/Mauritius"
      - TZ="Indian/Mauritius"
    volumes:
      - .n8n:/home/node/.n8n
    container_name: n8n

Interesting, If you run the workflow does it output the correct value anyway?

It runs normally but with “Invalid DateTime” as value

@yarlanda what happens if you use a different timezone / tz value? I am wondering if maybe we have an issue there.

1 Like


You’re right. It is with timezone. It works now

In fact I have commented my environment variables for timezone and it works!

Perfect, I will take a proper look in the morning to see if I can work out what is going on there.

@Jon Thanks again for your help

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.