Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WDbMF-0001UE-7X for pgsql-sql@arkaria.postgresql.org; Wed, 12 Feb 2014 15:04:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WDbME-00065Y-Kq for pgsql-sql@arkaria.postgresql.org; Wed, 12 Feb 2014 15:04:14 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WDbMD-00065R-I9 for pgsql-sql@postgresql.org; Wed, 12 Feb 2014 15:04:13 +0000 Received: from mail-pb0-x22b.google.com ([2607:f8b0:400e:c01::22b]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WDbM6-00071c-5r for pgsql-sql@postgresql.org; Wed, 12 Feb 2014 15:04:12 +0000 Received: by mail-pb0-f43.google.com with SMTP id md12so9331573pbc.16 for ; Wed, 12 Feb 2014 07:04:04 -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=FwPo5fIbNFp8tgk5ODaLatmZUAmFUnYdkxl0dWQDvMg=; b=OLDKsGvdh4LJCFx+8BLytOwFGArv19jiMTZCb5tV0nsMcMD+WNOnrz2/p5ngJLMFa2 l4FUcwXp5OI0+xQVEpKs4uwAQt35PylSJX+bwBRZspk36c2yztrHV3J4V33zd4FzXgBz fTLuRvFQTunPMFkrxFX9Q60mQvZ3js6D9UEBGmRKyI3I20RludcujQOql7tAP6SIuAy5 UZyr104tBb/BC8FJti1Buj2ndVbr8sj1MhE1OB0Vnn6++aMmo6QbSDSb1lg7wLVqpmM2 s5blMcZhqIVzVFSiOhAQh/TA2N3+dZWL2C5CI89Dewhf3QwRDJGNiqwjbLEQkUaQfYV9 kxLA== X-Received: by 10.66.159.132 with SMTP id xc4mr39614418pab.27.1392217444798; Wed, 12 Feb 2014 07:04:04 -0800 (PST) Received: from panda.site (65-102-185-39.tukw.qwest.net. [65.102.185.39]) by mx.google.com with ESMTPSA id sx8sm163097399pab.5.2014.02.12.07.03.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Feb 2014 07:03:37 -0800 (PST) Message-ID: <52FB8D48.6010805@gmail.com> Date: Wed, 12 Feb 2014 07:03:36 -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: Re: Time AT TIME ZONE: false result using offset instead of time zone name References: <1392105285704-5791371.post@n5.nabble.com> <52FA3499.3020604@gmail.com> <1392193455856-5791556.post@n5.nabble.com> In-Reply-To: <1392193455856-5791556.post@n5.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.0 (--) 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/12/2014 12:24 AM, rawi wrote: > Adrian Klaver-3 wrote >>> On 02/10/2014 11:54 PM, rawi wrote: >>> [...] >>> 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 > > Oh... oh... Disconcerting... I've just learned, that even javascript is > returning negative offsets for western situated browsers... Welcome to the wacky world of time, it is all relative:) The choices are handle everything as UTC until you present to the end user or use actual timezones, for example, America/Los_Angeles. To illustrate, in your original post you said: "But it would be easier to ask a specific time offset (got from a client around the world), so for me +01 hour" Do you know if that offset supplied by the client was POSIX or ISO in its sign? > > Thank you! > Regards, Rawi > > > -- 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