Re: time zone problem

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: time zone problem
Дата
Msg-id 201201160752.07067.adrian.klaver@gmail.com
обсуждение исходный текст
Ответ на Re: time zone problem  (Cefull Lo <cefull@gmail.com>)
Список pgsql-general
On Monday, January 16, 2012 5:50:42 am Cefull Lo wrote:
> Hi,
> I figure it out.
> If only the offset from UTC is given, you may try
>
> select current_timestamp at time zone (select name from
> pg_catalog.pg_timezone_names where utc_offset= interval '+8 hours' limit 1)
>
> Would give the exact timestamp at those time zone.

Meant to add to my previous post.
If you want to use a fixed interval then the above can simplified to:

select current_timestamp at time zone  interval '+8 hours'


--
Adrian Klaver
adrian.klaver@gmail.com

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