Re: timezone offsets and documentation - Mailing list pgsql-bugs

From Tom Lane
Subject Re: timezone offsets and documentation
Date
Msg-id 3087.1130009241@sss.pgh.pa.us
Whole thread Raw
In response to timezone offsets and documentation  (Kris Jurka <books@ejurka.com>)
List pgsql-bugs
Quite some time ago, Kris Jurka <books@ejurka.com> wrote:
> This allows:

> jurka=# set timezone to 'Etc/GMT-14';
> SET
> jurka=# select '00:00:00'::timetz;
>    timetz
> -------------
>  00:00:00+14
> (1 row)

> but this is not an allowed value:

> jurka=# select '00:00:00+14'::timetz;
> ERROR:  time zone displacement out of range: "00:00:00+14"

Yeah.  It's worse than that actually, because we will take something
like

SET TIMEZONE TO 'Etc/GMT+15';

I haven't traced through the code but I bet this is being accepted by
the "POSIX zone name" rule.  Perhaps we should sanity-check the computed
offset?

I'm not sure what the use of GMT-14 is, but I suggest that we ought to
defer to the judgment of the zic people in making it available.
Accordingly, we probably ought to modify the range of allowed timezone
offsets to allow -14:00 (and maybe +14:00 as well?)

Comments?

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1986: Please include ONE BIG .txt and .HTML file in *docs*.tar.gz
Next
From: "Magnus Hagander"
Date:
Subject: Re: BUG #1986: Please include ONE BIG .txt and .HTML file in *docs*.tar.gz