Re: time zone problem

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Cc: Cefull Lo <cefull(at)gmail(dot)com>
Subject: Re: time zone problem
Date: 2012-01-16 15:52:06
Message-ID: 201201160752.07067.adrian.klaver@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tore Halvorsen 2012-01-16 16:15:03 Re: Getting all entries in a single block with ctid
Previous Message Adrian Klaver 2012-01-16 15:28:59 Re: time zone problem