]> granicus.if.org Git - postgresql/commit
Expand the allowed range of timezone offsets to +/-15:59:59 from Greenwich.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 30 May 2012 23:58:54 +0000 (19:58 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 30 May 2012 23:58:54 +0000 (19:58 -0400)
commitf5c5e7497b6057151936313d0cdb6cc8dc159331
tree157a2da86ec3b78610f8a840c379f0efa666adc7
parent4c95cdabce4993c7c016b664dac73c5c7ed9770b
Expand the allowed range of timezone offsets to +/-15:59:59 from Greenwich.

We used to only allow offsets less than +/-13 hours, then it was +/14,
then it was +/-15.  That's still not good enough though, as per today's bug
report from Patric Bechtel.  This time I actually looked through the Olson
timezone database to find the largest offsets used anywhere.  The winners
are Asia/Manila, at -15:56:00 until 1844, and America/Metlakatla, at
+15:13:42 until 1867.  So we'd better allow offsets less than +/-16 hours.

Given the history, we are way overdue to have some greppable #define
symbols controlling this, so make some ... and also remove an obsolete
comment that didn't get fixed the last time.

Back-patch to all supported branches.
src/backend/utils/adt/date.c
src/backend/utils/adt/datetime.c
src/include/utils/timestamp.h