Re: BUG #13691: Postgres reverse timezone system - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #13691: Postgres reverse timezone system
Date
Msg-id 21077.1445406018@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #13691: Postgres reverse timezone system  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-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

pgsql-bugs by date:

Previous
From: Thomas Munro
Date:
Subject: Re: BUG #13691: Postgres reverse timezone system
Next
From: n8vred@gmail.com
Date:
Subject: BUG #13692: Error when run silent installation whith alredy installed PG9.4