W
W
WAYNEDEV2021-11-17 18:54:57
PostgreSQL
WAYNEDEV, 2021-11-17 18:54:57

How to make Moscow time in postrgresql database in docker-compose?

Hello!

version: "3.8"
services:
    db:
        image: postgres:latest
        environment:
            PGDATA: /var/lib/postgresql/data/some_name/
            POSTGRES_PASSWORD: ipadib339
            TZ: Europe/Moscow
        volumes:
            - data:/var/lib/postgresql/data
        ports:
            - "5432:5432"



Field type = timestamp without time zone TZ: Europe/Moscow does not help

I would be very grateful for the help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2021-11-17
@ky0

Moscow time (or any other) for a field without a time zone is made an adjustment in the application, let it be stored in UTC in the database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question