public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Bryn Llewellyn <[email protected]>
Cc: Pg Docs <[email protected]>
Subject:  Re: Where is the syntax "<-08>+08" documented—comes from "select current_setting('timezone')"
Date: Thu, 13 May 2021 13:09:01 -0700
Message-ID: <CAKFQuwZDTv_zHChey8th4Vy_gvxdkZNemS1cUVZutp6fwNxgHA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

On Thu, May 13, 2021 at 12:38 PM Bryn Llewellyn <[email protected]> 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.


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re:  Re: Where is the syntax "<-08>+08" documented—comes from "select current_setting('timezone')"
  In-Reply-To: <CAKFQuwZDTv_zHChey8th4Vy_gvxdkZNemS1cUVZutp6fwNxgHA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox