Re: Domain based on TIMEZONE WITH TIME ZONE

From: Ben Hood <ben(at)relops(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Domain based on TIMEZONE WITH TIME ZONE
Date: 2018-05-10 20:17:17
Message-ID: B0FEFCC3-3B17-4F5D-96DB-ED6F3BBA5DA3@relops.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On 10 May 2018, at 17:38, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2018-05-10 20:35:10 Re: Domain based on TIMEZONE WITH TIME ZONE
Previous Message Ben Hood 2018-05-10 20:14:00 Re: Domain based on TIMEZONE WITH TIME ZONE