Re: date_trunc() in a specific time zone

Поиск
Список
Период
Сортировка
От Paul A Jungwirth
Тема Re: date_trunc() in a specific time zone
Дата
Msg-id CA+renyUoD6j+CWmttZ9q1CaUMd7JCA0oXw2eTja4GfT0mZWQLg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: date_trunc() in a specific time zone  (Paul A Jungwirth <pj@illuminatedcomputing.com>)
Ответы Re: date_trunc() in a specific time zone
Re: date_trunc() in a specific time zone
Список pgsql-hackers
On Mon, Oct 29, 2018 at 9:58 AM Paul A Jungwirth
<pj@illuminatedcomputing.com> wrote:
> This patch adds a 3-arg version for date_trunc(text, timestamptz,
> text). I'm saying it would be nice to also have a 3-arg version for
> date_trunc(text, timestamp, text). It would do the same thing, except
> take a timestamp w/o tz and return a timestamp w/o tz.

Thinking about this some more, perhaps the timestamp-to-timestamp
version would depend on assumptions that aren't always valid. In my
world the server timezone is always UTC, and the database clients
always convert values to UTC before saving. But if those assumptions
don't hold the simple implementation of 2x AT TIME ZONE might not work
correctly. I can try it out and see....

Paul


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

Предыдущее
От: Paul A Jungwirth
Дата:
Сообщение: Re: date_trunc() in a specific time zone
Следующее
От: Paul A Jungwirth
Дата:
Сообщение: Re: date_trunc() in a specific time zone