-
Notifications
You must be signed in to change notification settings - Fork 55k
Description
Bug Description
In n8n Data Tables, the row system timestamps appear inconsistent:
- When a row is first created,
createdAt(andupdatedAt) reflects my configured instance's timezone correctly. - After updating the same row,
updatedAtis stored and returned in UTC, causingcreatedAtandupdatedAtto be shown in different timezones.
Note
If it matters, my .env has GENERIC_TIMEZONE set, but TZ is unset.
GENERIC_TIMEZONE=<MyTimeZone>
To Reproduce
- Configure n8n with environment variables above
- Create a Data Table.
- Insert a new row using a flow.
- Observe the row
createdAtand initialupdatedAtvalues (they match, and use correct time zone). - Update the same row (e.g. edit a cell) in a flow.
- Observe that
updatedAtis now in UTC, whilecreatedAtremains in the original timezone/format.
Actual Behavior
createdAt appears in my local/instance timezone, but updatedAt appears in UTC after updates.
This row was created while my system shows the same date/time as "createdAt". When the row was edited, the "updatedAt" is expected to also reflect the current displayed date/time, however the value of the UTC date/time was used to update it instead.
Expected behavior
createdAt and updatedAt for Data Table rows should be consistent in storage and representation.
If timestamps are returned via API/UI, they should use a consistent standard (ideally ISO-8601 with offset), or consistently follow instance timezone rules.
Notes / Suspected Cause
There might be different code paths for initial insert vs update:
- DataTable “touch” logic uses JS
new Date():DataTableRepository.touchUpdatedAt()updates table entity updatedAt withnew Date()
- Row updates go through
DataTableRowsRepository.updateRows()and may set rowupdatedAtusing database-side timestamps (e.g.CURRENT_TIMESTAMP), which can be UTC depending on DB/process configuration.
I'm not sure, I need to investigate the code more to be confident.
This suggests the row-level updatedAt might be set differently on INSERT vs UPDATE, or returned/serialized differently, producing the timezone mismatch.
Environment
- Hosting: self-hosted (bare-metal/VM), no Docker
GENERIC_TIMEZONE=<MyTimeZone>is setTZis NOT set- Operating System: Ubuntu Linux 24.04 noble
- n8n Version: 2.6.4
- Node.js Version: v24.13.0
- Database: PostgreSQL
- Hosting: self hosted