From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: dungdm93@live.com, PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13691: Postgres reverse timezone system
Date: Tue, 20 Oct 2015 22:40:18 -0700
Message-ID: <21077.1445406018@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEepm=1Bu3eQRVG-wsvBeN+M9=YO=DO7NRHzSvaA_SM8wpyTCA@mail.gmail.com>
References: <20151021034109.3017.131@wrigleys.postgresql.org>
<20893.1445404505@sss.pgh.pa.us>
<CAEepm=1Bu3eQRVG-wsvBeN+M9=YO=DO7NRHzSvaA_SM8wpyTCA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Thomas Munro <thomas.munro@enterprisedb.com> 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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, thomas.munro@enterprisedb.com
Subject: Re: BUG #13691: Postgres reverse timezone system
In-Reply-To: <21077.1445406018@sss.pgh.pa.us>
References: <20151021034109.3017.131@wrigleys.postgresql.org> <20893.1445404505@sss.pgh.pa.us> <CAEepm=1Bu3eQRVG-wsvBeN+M9=YO=DO7NRHzSvaA_SM8wpyTCA@mail.gmail.com> <21077.1445406018@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox