agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@gmail.com>
To: rawi <only4com@web.de>
To: pgsql-sql@postgresql.org
Subject: Re: Time AT TIME ZONE: false result using offset instead of time zone name
Date: Tue, 11 Feb 2014 06:32:57 -0800
Message-ID: <52FA3499.3020604@gmail.com> (raw)
In-Reply-To: <1392105285704-5791371.post@n5.nabble.com>
References: <1392105285704-5791371.post@n5.nabble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

On 02/10/2014 11:54 PM, rawi wrote:
> Hi,
> I am living in the Central European Time (CET == GMT+1)
>
> SELECT CURRENT_TIMESTAMP ;
>
> now
> timestamp with time zone
> ----------------------------
> 2014-02-11 08:21:52.83588+01
>
> And I want this without time zone but also for my own time zone (checking AT
> TIME ZONE); sure, I get it correct... the same...
>
> SELECT CURRENT_TIMESTAMP AT TIME ZONE 'CET';
>
> timezone
> timestamp without time zone
> ----------------------------
> 2014-02-11 08:22:39.586382
>
> But it would be easier to ask a specific time offset (got from a client
> around the world), so for me +01 hour:
>
> SELECT CURRENT_TIMESTAMP AT TIME ZONE 'UTC+01';
>
> timezone
> timestamp without time zone
> ---------------------------
> 2014-02-11 06:23:07.043479
>
> !!! Two hours earlyer, one hour to the east (Azores), not to the west of
> Greenwich.
> To get my time one hour west from Greenwich I have to ask:
>
> SELECT CURRENT_TIMESTAMP AT TIME ZONE 'UTC-01';
>
> Is this inverse calculation intently?

Yes.

http://www.postgresql.org/docs/9.3/interactive/datatype-datetime.html#DATATYPE-TIMEZONES

8.5.3. Time Zones

.. Another issue to keep in mind is that in POSIX time zone names, 
positive offsets are used for locations west of Greenwich. Everywhere 
else, PostgreSQL follows the ISO-8601 convention that positive timezone 
offsets are east of Greenwich

>
> Thank you!
> Regards, Rawi
>
>
>
>
> --
> View this message in context: http://postgresql.1045698.n5.nabble.com/Time-AT-TIME-ZONE-false-result-using-offset-instead-of-time-...
> Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
>
>


-- 
Adrian Klaver
adrian.klaver@gmail.com


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (7+ messages)  latest in thread

Message-ID: <52FA3499.3020604@gmail.com>
Permalink:  ../52FA3499.3020604@gmail.com/
Also on:    postgresql.org/message-id/52FA3499.3020604@gmail.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: adrian.klaver@gmail.com, only4com@web.de
  Subject: Re: Time AT TIME ZONE: false result using offset instead of time zone name
  In-Reply-To: <52FA3499.3020604@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox