Re: Changing displayed time zone in RAISE NOTICE output?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Ron <ronljohnsonjr(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Changing displayed time zone in RAISE NOTICE output?
Date: 2023-01-12 15:38:54
Message-ID: f4d4e8f2-0c73-577f-4184-c7a78121ef8f@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1/11/23 21:25, Ron wrote:
> On 1/11/23 15:06, Adrian Klaver wrote:

>
> Hmm.  I'd have sworn this didn't work when I tried it:

Did you do?:

DO $$
BEGIN
RAISE NOTICE '%', clock_timestamp() at timezone 'UTC';
END$$;
ERROR: syntax error at or near "timezone"
LINE 3: RAISE NOTICE '%', clock_timestamp() at timezone 'UTC';

>
> postgres=#
> postgres=# DO $$
> BEGIN
> RAISE NOTICE '%', clock_timestamp() at time zone 'UTC';
> END$$;
> NOTICE:  2023-01-12 05:22:40.517299
>
> But it does work, so all's well that ends well.
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2023-01-12 16:22:33 Re: Changing displayed time zone in RAISE NOTICE output?
Previous Message Laurenz Albe 2023-01-12 15:38:35 Re: default icu locale for new databases (PG15)