Re: Per-query local timezone

Поиск
Список
Период
Сортировка
От Mark Morgan Lloyd
Тема Re: Per-query local timezone
Дата
Msg-id it7j8p$jlt$1@pye-srv-01.telemetry.co.uk
обсуждение исходный текст
Ответ на Re: Per-query local timezone  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Ответы Re: Per-query local timezone
Список pgsql-general
Karsten Hilbert wrote:
> On Tue, Jun 14, 2011 at 09:40:20AM +0000, Mark Morgan Lloyd wrote:
>
>> Is it possible to incorporate SET TIMEZONE into a query, so that
>> to_char(...'TZ') etc. is appropriately localised?
>
> You seem to want "AT TIME ZONE".

Thanks for that. How can I do /this/

select to_char(now() at time zone 'GMT0BST', 'TZ');

It appears to return '', while if I used a separate SET TIMEZONE I'd
expect 'BST'.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

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

Предыдущее
От: John R Pierce
Дата:
Сообщение: Re: Per-query local timezone
Следующее
От: Vick Khera
Дата:
Сообщение: Re: PGP encrypt/decrypt - Prereqistes