Re: time zone problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Cefull Lo <cefull(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: time zone problem
Date: 2012-01-13 16:18:27
Message-ID: 22794.1326471507@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Cefull Lo <cefull(at)gmail(dot)com> writes:
> I'm located in Hong Kong, UTC+8 time zone. When I
> select current_timestamp;
> 2012-01-13 23:56:16.825558+08

> However, when I
> select current_timestamp at time zone 'UTC+8';
> I expect the result is the same as the above one.

Sorry, but it isn't. A time zone name spelled that way is a POSIX time
zone specification, and in POSIX positive offsets are west of Greenwich,
not east. See
http://www.postgresql.org/docs/9.1/static/datatype-datetime.html#DATATYPE-TIMEZONES

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matt Dew 2012-01-13 16:32:59 Re: indexes no longer used after shutdown during reindexing
Previous Message Cefull Lo 2012-01-13 15:59:56 time zone problem