Re: Converting to UTC multiple times converts back to local time zone

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Converting to UTC multiple times converts back to local time zone
Дата
Msg-id CAKFQuwaEA0XLWTpBG7aqZ_qz3FDT_E54zjXfhfRfoxzskd_B5A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Converting to UTC multiple times converts back to local time zone  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
On Mon, Jun 25, 2018 at 5:52 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
 timestamptz AT TIME ZONE's usefulness is marginal at best - and in any case should not be used in subqueries.  Pass the original timestamptz typed value around until you are ready to send it to the user.

​Just to clarify that a bit - usually query results as passed to another layer which then presents the results to a person.  Pass that layer a timestamptz and let it decide how to deal with presentation.  If psql is used as the client presentation layer then you will need to use AT TIME ZONE (or TimeZone GUC depending on the situation) but that still falls within the general idea of pushing display as close to the user as possible.

David J.

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Converting to UTC multiple times converts back to local time zone
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #15252: "do not dump comments" in pg_restore help