Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLpWr-000602-Ac for pgsql-general@arkaria.postgresql.org; Mon, 04 Dec 2017 12:07:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLpWq-0006nD-KL for pgsql-general@arkaria.postgresql.org; Mon, 04 Dec 2017 12:07:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eLpWq-0006n4-B8 for pgsql-general@lists.postgresql.org; Mon, 04 Dec 2017 12:07:20 +0000 Received: from mail-qk0-x229.google.com ([2607:f8b0:400d:c09::229]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eLpWd-0001Vp-65 for pgsql-general@lists.postgresql.org; Mon, 04 Dec 2017 12:07:17 +0000 Received: by mail-qk0-x229.google.com with SMTP id 63so21105133qke.0 for ; Mon, 04 Dec 2017 04:07:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:date:in-reply-to:references:mime-version :content-transfer-encoding; bh=mj58hgxf7OO1CUFr+ih7Z9Bi2vT9FarRLkRVYkbHU0I=; b=T3erWkqMMmihbaYLqIUPWOsitKhxQttsC+ApAuf6gB21cWgr1KDMvaUwirBbHT7ndA Sz8JJkDFIwjAxkCgbAUoXEmrovb/aLvf71gNgS+PIyBNP49dsMG8C9pQoZ2sPpmLoi65 oDJtL/z2nW6P7NYxMDs4mOvq4SkBQDPB7s5JgRbhdUP3K1YwsDvGYaGyFyA2bynrcWLG uOkfsUmllDzRkI/ln3ds6fdt+5T5Uxn0K/g5NavByxCMx3OLUFqTx0K06E9BQD7WevQt 6cpOQVIYsv3rGfOTLUEOy2bCkFq7mTwsEODgQGGbuchdVtOvkTegTj2qH+EJ5aPo5zfX 5qdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=mj58hgxf7OO1CUFr+ih7Z9Bi2vT9FarRLkRVYkbHU0I=; b=hhlZM1L86JJaEt8+aTU1SJJyI8jRlt/23DUAXIekOpoalB9yLEGJdv1Q43XqAqyTN7 06nx3g8W115MQbPCqcS7UZse7kcHWG8gKX/wY01cSbAcjbp94bDqpC+d4lMQuuknTjui cEFXpjYl7RQ3EJxEG/CdShtGRU4e0VRahLp/U9xpj+g/ZcIpFXyxSMMhe6YU1YE3M0Ll +ibK6zpMfibhMmrDR8c4EaxXwzqKUqTuSVtBPXhi65c8O22iZSQWbglPnATQRAEUHY6f 2/kX/vwP4MQ9vi7nqQ1rO5KzKGCUqW5zZS0pqamTrGyB9uIlzHIAj6QlqX4JTyiE6IFv s+rQ== X-Gm-Message-State: AKGB3mLcxOq29EmN2Mjck1nXaQBoTEK4DyCfxCI1/YxHSzkeUZpn6q2P k558xiF8i4FnXGY8uQTWZEY= X-Google-Smtp-Source: AGs4zMapuW/n7rA1zG47JZ09OsJHVBD6VGyWtBuHsGMrwDZ7CgsJ0lqDjN+Ge7qiyE0xUuMZ8CODWQ== X-Received: by 10.55.128.129 with SMTP id b123mr19865351qkd.1.1512389225540; Mon, 04 Dec 2017 04:07:05 -0800 (PST) Received: from roblaptop ([2804:14d:baa0:8491:461e:a1ff:fe19:c7bd]) by smtp.gmail.com with ESMTPSA id 46sm9280975qtx.65.2017.12.04.04.07.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Dec 2017 04:07:05 -0800 (PST) Message-ID: <1512389222.5095.4.camel@gmail.com> Subject: Re: ISO8601 vs POSIX offset clarification From: rob stone To: Bharanee Rathna , pgsql-general@lists.postgresql.org Date: Mon, 04 Dec 2017 23:07:02 +1100 In-Reply-To: References: <21940.1512356153@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.2-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, 2017-12-04 at 14:03 +1100, Bharanee Rathna wrote: > To be more specific, I expected the output of both these queries to > be the same. > > # select '2017-12-01 11:00:00 +11:00'::timestamp with time zone at > time zone '+11:00'; > timezone > --------------------- > 2017-11-30 13:00:00 > > # select '2017-12-01 11:00:00 +11:00'::timestamp with time zone at > time zone 'Australia/Melbourne'; > timezone > --------------------- > 2017-12-01 11:00:00 > > Cheers > select '2017-12-01 11:00:00 +11:00'::timestamp with time zone at time zone INTERVAL '+11:00'; Result:- 2017-12-01 11:00:00.0 You need the INTERVAL keyword when using a numeric value instead of a time zone name. It's in the doco. The parser ought to throw an error, but it doesn't.