Re: Timezone difference between Oracle SYSDATE and PostgreSQL timestamp functions

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Timezone difference between Oracle SYSDATE and PostgreSQL timestamp functions
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B17D2FA61@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на Timezone difference between Oracle SYSDATE and PostgreSQL timestamp functions  (Vinayak <vinpokale@gmail.com>)
Список pgsql-general
Vinayak wrote:
> We have converted Oracle SYSDATE to PostgreSQL statement_timestamp() but
> there is a difference in timezone.
> SYSDATE returns the time on the server where the database instance is
> running(returns operating system time) so the time depends on the OS
> timezone setting.
> while the timezone of postgreSQL
> statement_timestamp()/now()/clock_timestamp() depends on the DBMS setting.
> so I think timezone settings are different between DBMS and OS.

[...]

> Any idea how can we set OS timezone on PostgreSQL?

If you mean the *server's* OS timezone, I guess you'd have to write
a C function that does something similar to identify_system_timezone()
in bin/initdb/findtimezone.c.

Yours,
Laurenz Albe

В списке pgsql-general по дате отправления:

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Timezone difference between Oracle SYSDATE and PostgreSQL timestamp functions
Следующее
От: Jacob Bunk Nielsen
Дата:
Сообщение: Re: Postgres 9.1 issues running data directory from VMware shared folder