Expand the allowed range of timezone offsets to +/-15:59:59 from Greenwich.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: cd0ff9c0f47784b428981280cd9564bb79a8266a
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2012-05-30T23:58:35Z
Releases: 9.2.0
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.

Files

PathChange+/−
src/backend/utils/adt/date.c modified +2 −3
src/backend/utils/adt/datetime.c modified +2 −4
src/include/datatype/timestamp.h modified +10 −0