Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WDEOa-0002TW-0f for pgsql-sql@arkaria.postgresql.org; Tue, 11 Feb 2014 14:33:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WDEOZ-0003Hb-FI for pgsql-sql@arkaria.postgresql.org; Tue, 11 Feb 2014 14:33:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WDEOX-0003HM-EH for pgsql-sql@postgresql.org; Tue, 11 Feb 2014 14:33:05 +0000 Received: from mail-pb0-x22a.google.com ([2607:f8b0:400e:c01::22a]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WDEOU-0001EX-2Q for pgsql-sql@postgresql.org; Tue, 11 Feb 2014 14:33:04 +0000 Received: by mail-pb0-f42.google.com with SMTP id jt11so7778215pbb.15 for ; Tue, 11 Feb 2014 06:33:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=zVMyEl2cr7n6Vc+yCUIeaKEy+clzJm2o5hdtBQ7BYqU=; b=Ma33whpGVG/B51INpYCa6Mmpxci/fAhwdzCxDmKJ7FtyKAST1oxqZT/3cYxMTyZsbC NlZgJwqalPWYiuLsyDqBTA6H3zM3+Bl/FPJUltVYjgQ1haRVc3h55eC8lFkSMHu6z0X+ 9qG5jo5JHewo69vrWDWP5xRwETQ1hIkQsZUtDCr2OBmaMWM0r480obTZ9WEiBd6Dcm4T VPSAharLqRAnHY4OP7tIw0oq+ASEvnmcQoOJCdub2WUZloSIIi4AJwnUN9y+MbnEFq3D AcONeVznoSRW/55bCDvIw/qCbu/rItxp4mHm2DS7ks0Dile2oImbjFyERuJFj5e3v6dW CeaA== X-Received: by 10.68.134.8 with SMTP id pg8mr45541503pbb.84.1392129179287; Tue, 11 Feb 2014 06:32:59 -0800 (PST) Received: from panda.site (65-102-185-39.tukw.qwest.net. [65.102.185.39]) by mx.google.com with ESMTPSA id qf7sm137128961pac.14.2014.02.11.06.32.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 11 Feb 2014 06:32:58 -0800 (PST) Message-ID: <52FA3499.3020604@gmail.com> Date: Tue, 11 Feb 2014 06:32:57 -0800 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: rawi , pgsql-sql@postgresql.org Subject: Re: Time AT TIME ZONE: false result using offset instead of time zone name References: <1392105285704-5791371.post@n5.nabble.com> In-Reply-To: <1392105285704-5791371.post@n5.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.9 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org 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-zone-name-tp5791371.html > 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