Re: time zone problem - Mailing list pgsql-general

From Adrian Klaver
Subject Re: time zone problem
Date
Msg-id 201201160752.07067.adrian.klaver@gmail.com
Whole thread Raw
In response to Re: time zone problem  (Cefull Lo <cefull@gmail.com>)
List 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 by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: time zone problem
Next
From: Tore Halvorsen
Date:
Subject: Re: Getting all entries in a single block with ctid