Notion node returns bad date inside formula

The issue

When using the notion trigger node, the retrieved date inside a formula is the wrong one.
The record shows in my local notion app, a formula with todays date (January 15), but the record when retrieved from the notion trigger node, displays tomorrows date inside the formula.

This is the notion database formula, I use it to retrieve a currency exchange rate from google finance, the date inside the formula is “2023-01-15”

This is what the notion trigger node displays from the same record, the formula is showing “2023-01-16”.

The workflow

My best guess is that is something related to the format of the date, as I understand Notion uses the ISO format for dates, and the corresponding ISO for the date inside the formula is “2023-01-16T00:30:00.000Z” so it might be related with timezone conversion(?), it’s beyond my understanding so far haha.
I’ve reached Notion support as well, just in case it is something on their end.
I would appreciate any suggestions.
Thanks

  • n8n version: 210.2

Hey @seba5496,

How do you have n8n installed? I am just wondering if maybe this is down to the instance timezone maybe being different so while Notion is using 00:30:00 if your instance is using a different timezone it might be doing something funky there.

I’m running a version n8n in Digital Ocean droplet with portainer, created with the official guide as a baseline, which I modified, to use an image of n8n that includes python and a python code node, from this GitHub repo.

With a generic docker-compose file like this one:

version: '3.8'

services:
  n8n-python:
    image: naskio/n8n-python:latest
    #    image: naskio/n8n-python # alpine for light python packages
    #    command: /bin/sh -c "n8n start"
    restart: always
    container_name: n8n-python
    environment:
      - TZ=${GENERIC_TIMEZONE}
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER
      - N8N_BASIC_AUTH_PASSWORD
      - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
      - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
      - NODE_FUNCTION_ALLOW_EXTERNAL=node-fetch,xhr
      - N8N_LOG_LEVEL=debug
      - N8N_LOG_OUTPUT=console,file
      - N8N_LOG_FILE_MAXSIZE=50
      - N8N_LOG_FILE_MAXCOUNT=60
    ports:
      - "5678:5678"
    volumes:
      - ./n8n_data:/home/node/.n8n
      - ./local-files:/data/files # by default workdir == /data
      - ./python_scripts:/data/py_scripts
      - ./requirements.txt:/data/requirements.txt

My local timezone is “America/Santiago”, which is injected with the .env file with Portainer WebUI. Other thing I modified from the original guide, is that I deleted the caddy service since I connect using a tunnel, not the public IP of the server.
Just to make sure, I configured the host timezone with the same of the docker container, but the issue persists :slightly_frowning_face:

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