# Wrong timezone in PostgreSQL

**URL:** <https://community.n8n.io/t/wrong-timezone-in-postgresql/56933>\
**Category:** Questions\
**Tags:** node\
**Created:** [October 7, 2024, 7:40pm UTC](https://community.n8n.io/t/wrong-timezone-in-postgresql/56933 "2024-10-07T19:40:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vladimir\_Petrosov](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/vladimir_petrosov/32/33979_2.png) [@Vladimir\_Petrosov](https://community.n8n.io/u/Vladimir_Petrosov)\
**Post date:** [October 7, 2024, 7:40pm UTC](https://community.n8n.io/t/wrong-timezone-in-postgresql/56933/1 "2024-10-07T19:40:26Z")

</div>

## Describe the problem/error/question

When I use PostgreSQL I get UTC timezone, even in env. the TZ sets as ‘Europe/Moscow’. In N8N in Workflow I see +3 timezine, which is correct. Only PostgreSQL drive works with UTC TZ. The timezone on Ubuntu machine set as +3, PosgtreSQL server has this timezone as well.

## What is the error message (if any)?

- **n8n version:** 1.61
- **Database (default: SQLite):** PostgreSQL
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):** Docker-Swarm
- **Operating system:** Ubuntu

---

<div class="post-metadata">

**Author:** ![Vladimir\_Petrosov](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/vladimir_petrosov/32/33979_2.png) [@Vladimir\_Petrosov](https://community.n8n.io/u/Vladimir_Petrosov)\
**Post date:** [October 7, 2024, 7:52pm UTC](https://community.n8n.io/t/wrong-timezone-in-postgresql/56933/2 "2024-10-07T19:52:25Z")

</div>

The container has MSK time

root@root:~# docker exec -it 0eb6632c82c2 date  
Mon Oct 7 22:51:36 MSK 2024

---

<div class="post-metadata">

**Author:** ![ria](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ria/32/99251_2.png) [@ria](https://community.n8n.io/u/ria)\
**Post date:** [October 9, 2024, 7:20am UTC](https://community.n8n.io/t/wrong-timezone-in-postgresql/56933/3 "2024-10-09T07:20:11Z")

</div>

Hi @Vladimir_Petrosov

Thank you for reporting this.

Which node are using and how did you discover the discrepancy? Can you share a minimal workflow and instructions on how to reproduce this?

Thank You 🙏

---

<div class="post-metadata">

**Author:** ![Vladimir\_Petrosov](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/vladimir_petrosov/32/33979_2.png) [@Vladimir\_Petrosov](https://community.n8n.io/u/Vladimir_Petrosov)\
**Post date:** [October 9, 2024, 7:50am UTC](https://community.n8n.io/t/wrong-timezone-in-postgresql/56933/4 "2024-10-09T07:50:10Z")

</div>

Hi!

Just use PostgreSQL node with SQL-command ‘show timezone’

---

<div class="post-metadata">

**Author:** ![ria](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ria/32/99251_2.png) [@ria](https://community.n8n.io/u/ria)\
**Post date:** [October 9, 2024, 12:44pm UTC](https://community.n8n.io/t/wrong-timezone-in-postgresql/56933/5 "2024-10-09T12:44:56Z")

</div>

Can you check that your timezone is preserved in the `postgresql.conf`?  
Also, which node version are you using?

---

<div class="post-metadata">

**Author:** ![Vladimir\_Petrosov](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/vladimir_petrosov/32/33979_2.png) [@Vladimir\_Petrosov](https://community.n8n.io/u/Vladimir_Petrosov)\
**Post date:** [October 9, 2024, 1:08pm UTC](https://community.n8n.io/t/wrong-timezone-in-postgresql/56933/6 "2024-10-09T13:08:36Z")

</div>

It’s ‘Etc/UTC’ now but I’ve changed it without restart with SET timezone = ‘Europe/Moscow’ and ALTER Datebase. So it didn’t work.

The solution was - ALTER USER XXX SET timezone = ‘Europe/Moscow’;

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [October 16, 2024, 1:08pm UTC](https://community.n8n.io/t/wrong-timezone-in-postgresql/56933/7 "2024-10-16T13:08:37Z")

</div>

Closed on October 16, 2024, 1:08pm UTC

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