Re: BUG #13691: Postgres reverse timezone system

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: dungdm93(at)live(dot)com, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13691: Postgres reverse timezone system
Date: 2015-10-21 05:40:18
Message-ID: 21077.1445406018@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message n8vred 2015-10-21 11:32:25 BUG #13692: Error when run silent installation whith alredy installed PG9.4
Previous Message Thomas Munro 2015-10-21 05:21:04 Re: BUG #13691: Postgres reverse timezone system