Re: SELECT TIMESTAMP WITH TIME ZONE ... AT TIME ZOME as inverted meaning with UTC times...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andreas Schultz" <andreas(dot)schultz(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SELECT TIMESTAMP WITH TIME ZONE ... AT TIME ZOME as inverted meaning with UTC times...
Date: 2007-05-08 16:06:29
Message-ID: 2175.1178640389@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Andreas Schultz" <andreas(dot)schultz(at)gmail(dot)com> writes:
> MST is UTC-07, so i would expect that i can replace MST with UTC-07, but:

> # SELECT TIMESTAMP WITH TIME ZONE '2001-02-16 20:38:40-05' AT TIME
> ZONE 'UTC-07';
> timezone
> ---------------------
> 2001-02-17 08:38:40

> The time returned is at UTC+07....

A time zone name in that form is a POSIX-spec timezone specification,
and the POSIX spec says that positive is west from Greenwich.
Everywhere else in Postgres we follow the SQL spec, which says that
positive is east from Greenwich. Aren't standards wonderful?

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andreas 2007-05-08 16:09:18 PG on Debian 4.0.x ?
Previous Message Nico Sabbi 2007-05-08 16:05:41 Re: Some problem with warm standby server