pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ben Hood <ben@relops.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Domain based on TIMEZONE WITH TIME ZONE
Date: Thu, 10 May 2018 21:17:17 +0100
Message-ID: <B0FEFCC3-3B17-4F5D-96DB-ED6F3BBA5DA3@relops.com> (raw)
In-Reply-To: <93d7120e-ca04-467f-4b55-a5ca0e8d255c@aklaver.com>
References: <06EAD729-DC35-4E48-AB25-C42F7FA19C28@relops.com>
	<CA+bJJbz0Gwo8mkyzHa_4qjcNcMV0M00yTZ_LjUtaJu=M=+bpyQ@mail.gmail.com>
	<188A0270-0A9A-4ADE-A928-9067E99AE7B7@relops.com>
	<20180510103608.GB3622@hermes.hilbert.loc>
	<BCC1C385-7AAC-42BD-B790-08D7624C9414@relops.com>
	<adb8d193-e9a6-f141-2c59-9291ad6c5220@aklaver.com>
	<5188949D-FEDD-45C6-85CA-2E2AAC5CF1C9@relops.com>
	<93d7120e-ca04-467f-4b55-a5ca0e8d255c@aklaver.com>




> On 10 May 2018, at 17:38, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
> 
> Well if you are using a timestamp with timezone field the value is always going to be stored as UTC. The TimeZone setting just determines the rotation from the input value to the stored value and the reverse. My previous point was just that Postgres will not enforce an offset on input data.

Good point.

>> Then the only way to know what the effective zone offset will be is to find out what the server default is.
>> Is this plausible?
> 
> If you mean find the server default then yes:
> 
> test_(aklaver)> select current_setting('TimeZone');
> current_setting
> -----------------
> US/Pacific

Thanks for the tip.=

view thread (36+ messages)  latest in thread

Message-ID: <B0FEFCC3-3B17-4F5D-96DB-ED6F3BBA5DA3@relops.com>
Permalink:  ../B0FEFCC3-3B17-4F5D-96DB-ED6F3BBA5DA3@relops.com/
Also on:    postgresql.org/message-id/B0FEFCC3-3B17-4F5D-96DB-ED6F3BBA5DA3@relops.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ben@relops.com
  Subject: Re: Domain based on TIMEZONE WITH TIME ZONE
  In-Reply-To: <B0FEFCC3-3B17-4F5D-96DB-ED6F3BBA5DA3@relops.com>
  References: <06EAD729-DC35-4E48-AB25-C42F7FA19C28@relops.com> <CA+bJJbz0Gwo8mkyzHa_4qjcNcMV0M00yTZ_LjUtaJu=M=+bpyQ@mail.gmail.com> <188A0270-0A9A-4ADE-A928-9067E99AE7B7@relops.com> <20180510103608.GB3622@hermes.hilbert.loc> <BCC1C385-7AAC-42BD-B790-08D7624C9414@relops.com> <adb8d193-e9a6-f141-2c59-9291ad6c5220@aklaver.com> <5188949D-FEDD-45C6-85CA-2E2AAC5CF1C9@relops.com> <93d7120e-ca04-467f-4b55-a5ca0e8d255c@aklaver.com> <B0FEFCC3-3B17-4F5D-96DB-ED6F3BBA5DA3@relops.com>

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

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