Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zom8V-0003Bf-DK for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Oct 2015 05:40:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zom8T-0002hk-Sy for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Oct 2015 05:40:29 +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) (envelope-from ) id 1Zom8S-0002hb-Er for pgsql-bugs@postgresql.org; Wed, 21 Oct 2015 05:40:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Zom8N-0003KX-VJ for pgsql-bugs@postgresql.org; Wed, 21 Oct 2015 05:40:26 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t9L5eInh028778; Wed, 21 Oct 2015 01:40:19 -0400 From: Tom Lane To: Thomas Munro cc: dungdm93@live.com, PostgreSQL Bugs Subject: Re: BUG #13691: Postgres reverse timezone system In-reply-to: References: <20151021034109.3017.131@wrigleys.postgresql.org> <20893.1445404505@sss.pgh.pa.us> Comments: In-reply-to Thomas Munro message dated "Wed, 21 Oct 2015 18:21:04 +1300" Date: Tue, 20 Oct 2015 22:40:18 -0700 Message-ID: <21077.1445406018@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Thomas Munro writes: > It's pretty surprising that '+13' is not negated, but '+13:00' is. Is > that expected? Um, well, there's yet a third randomly-different standard involved here, which is that the SQL spec says that timezones can be specified as purely numeric GMT offsets --- using the ISO sign convention. So "+13" is captured by that rule; while "+13:00" doesn't look like a plain number so it gets taken in by the POSIX conventions. We can probably find a few more standards governing PG's behavior in this area, if you care to keep poking ;-). But looking for absolute mathematical consistency in anything having to do with timekeeping is a lost cause. Since there pretty much isn't any way that the SQL spec's timezone rules don't suck, I'd urge avoiding that particular notation. Really the Olson-style geographically-based zone names are the least ambiguous and the least likely to be wrong when considering past and future law changes. If I were the OP I'd be using "Asia/Ho_Chi_Minh". regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs