Re: Where is the syntax "<-08>+08" documented—comes from "select current_setting('timezone')"

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Bryn Llewellyn <bryn(at)yugabyte(dot)com>
Cc: Pg Docs <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: Where is the syntax "<-08>+08" documented—comes from "select current_setting('timezone')"
Date: 2021-05-13 20:09:01
Message-ID: CAKFQuwZDTv_zHChey8th4Vy_gvxdkZNemS1cUVZutp6fwNxgHA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Thu, May 13, 2021 at 12:38 PM Bryn Llewellyn <bryn(at)yugabyte(dot)com> wrote:

> « POSIX has positive signs west of Greenwich, but many people expect
> positive signs east of Greenwich. »
>
> Is there a setting that I can do to make "set timezone = '-08:00'" treat
> it as a request to set the negative value that I said?
>

That ultimately comes from the appendix.

https://www.postgresql.org/docs/current/datetime-posix-timezone-specs.html

As noted here:

https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-TIMEZONES

There are three ways to specify TimeZone in PostgreSQL. You are using the
third option and thus are dealing with the caveats noted in the third
entry's description and described in detail in the appendix linked to above.

I suggest restricting your use to one of the other two, recommended,
options. If you cannot avoid using the third option you must learn and
abide by its rules.

David J.

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Bryn Llewellyn 2021-05-13 20:34:06 Re: Where is the syntax "<-08>+08" documented—comes from "select current_setting('timezone')"
Previous Message Bryn Llewellyn 2021-05-13 19:38:27 Where is the syntax "<-08>+08" documented—comes from "select current_setting('timezone')"