pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: rob stone <floriparob@gmail.com>
Cc: Paul McGarry <paul@paulmcgarry.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: How to get timezone offset in timestamp with time zone AT TIME ZONE output.
Date: Wed, 25 Sep 2019 04:01:39 +0100
Message-ID: <871rw5nkqx.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <85cd91320ad71bd44d8d82aed52b29c2b08888ab.camel@gmail.com>
References: <CAPrE0SYkp12Gd2Y0NVxTwvp_EpMymDa=i_vVQ3EZD11MOSJTRQ@mail.gmail.com>
	<dd0f5c95-08e0-f198-b59a-704377ccdcf7@aklaver.com>
	<87impio1tf.fsf@news-spur.riddles.org.uk>
	<91469459-36f7-41a4-09e9-c88d693cccef@aklaver.com>
	<CAPrE0SbBcD+adG_YLpphu3CjpVZUp7bXqJ6vxvxySX2vGpGMNw@mail.gmail.com>
	<85cd91320ad71bd44d8d82aed52b29c2b08888ab.camel@gmail.com>

>>>>> "rob" == rob stone <floriparob@gmail.com> writes:

 rob> You can EXTRACT timezone, timezone_hour and timezone_minute from a
 rob> timestamp. Using 'timezone' returns a value representing seconds
 rob> from UTC.

Yes, but this always outputs a value representing the server timezone;
there's no way (other than the same function set_config trick I gave
above) to make it return a value that represents a different timezone
per row.

-- 
Andrew (irc:RhodiumToad)





view thread (9+ messages)

Message-ID: <871rw5nkqx.fsf@news-spur.riddles.org.uk>
Permalink:  ../871rw5nkqx.fsf@news-spur.riddles.org.uk/
Also on:    postgresql.org/message-id/871rw5nkqx.fsf@news-spur.riddles.org.uk

 · 

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: andrew@tao11.riddles.org.uk, floriparob@gmail.com, paul@paulmcgarry.com, adrian.klaver@aklaver.com
  Subject: Re: How to get timezone offset in timestamp with time zone AT TIME ZONE output.
  In-Reply-To: <871rw5nkqx.fsf@news-spur.riddles.org.uk>
  References: <CAPrE0SYkp12Gd2Y0NVxTwvp_EpMymDa=i_vVQ3EZD11MOSJTRQ@mail.gmail.com> <dd0f5c95-08e0-f198-b59a-704377ccdcf7@aklaver.com> <87impio1tf.fsf@news-spur.riddles.org.uk> <91469459-36f7-41a4-09e9-c88d693cccef@aklaver.com> <CAPrE0SbBcD+adG_YLpphu3CjpVZUp7bXqJ6vxvxySX2vGpGMNw@mail.gmail.com> <85cd91320ad71bd44d8d82aed52b29c2b08888ab.camel@gmail.com> <871rw5nkqx.fsf@news-spur.riddles.org.uk>

* 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