From: Nikolay Samokhvalov <samokhvalov@gmail.com>
To: Alexander Kuprijanov <sanya-spb@list.ru>
Cc: pgsql-ru-general@postgresql.org
Subject: Re: [pgsql-ru-general] дата-время в базе отличаются от системных
Date: Sat, 13 Oct 2007 01:04:57 +0400
Message-ID: <e431ff4c0710121404u6bd55ab1od970e21badc8541b@mail.gmail.com> (raw)
In-Reply-To: <200710121500.22307.sanya-spb@list.ru>
References: <200710121500.22307.sanya-spb@list.ru>
On 10/12/07, Alexander Kuprijanov <sanya-spb@list.ru> wrote:
> Добрый день
>
> такая вот проблемка:
> ========================
> $ date; echo 'select CURRENT_TIME;' | psql MyBase
> Fri Oct 12 14:51:10 MSD 2007
> timetz
> --------------------
> 10:51:11.031388+00
> (1 row)
> ========================
>
>
> подскажите где подправить?
>
> Как я понимаю что-то связано с часовыми поясами... но почему-то сбилось
>
> Если еще и ткнете в мануал, буду благодарен.
Не вижу проблемки :-)
Постгрес "сидит" в нулевом часовом поясе.
http://www.postgresql.org/docs/8.2/interactive/datatype-datetime.html#DATATYPE-TIMEZONES
На выбор:
- set timezone to 'Europe/Moscow'; на лету каждый раз
- подправить в postgresql.conf
- alter database XYZ set timezone to 'Europe/Moscow'; (или то же для
user) /* надо помнить, что pg_dump такие свойства не сдампит, только
pg_dumpall */
--
Best regards,
Nikolay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-ru-general@postgresql.org
Cc: samokhvalov@gmail.com, sanya-spb@list.ru
Subject: Re: =?KOI8-R?B?UmU6IFtwZ3NxbC1ydS1nZW5lcmFsXSDEwdTBLdfSxc0=?= =?KOI8-R?B?0SDXIMLB2sUgz9TMyd7BwNTT0SDP1CDTydPUxc3O2cg=?=
In-Reply-To: <e431ff4c0710121404u6bd55ab1od970e21badc8541b@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox