Re: Failure of postgres_fdw because of TimeZone setting

From: Adnan Dautovic <daut(at)mailbox(dot)org>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Failure of postgres_fdw because of TimeZone setting
Date: 2024-04-10 19:48:30
Message-ID: 96BEAF51-6D82-4BFA-9DD2-A02389921746@mailbox.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear Adrian,

On 05. Apr 2024, at 17:05, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> wrote:
>The below is cut down from the actual output as there should be at least:
>
>Europe/Berlin CEST 02:00:00 t
>
>present also?

Correct! That entry also exists. I only included the snippet
where I would have expected the "UTC" entry to be.

>1) For the long term contact whomever is in charge of the remote
>server and ask them what they have done with the timezones, why and
>can they fix it?

This will probably be long term indeed. But I am curious and want
to see if I can get some information from the responsible
person(s).

>2) In short term per the link from your first post and with no guarantees:
>
>https://github.com/postgres/postgres/blob/936e3fa3787a51397280c1081587586e83c20399/contrib/postgres_fdw/connection.c#L677
>
>In the source code change
>
>do_sql_command(conn, "SET timezone = 'UTC'");
>
>to
>
>do_sql_command(conn, "SET timezone = 'Universal'");
>
>As from the link: "Set remote timezone; this is basically just cosmetic"
>
>Then recompile the extension.

Thank you, I got around to trying this route and it worked! Now I
just have to tinker around a bit to see how I can best include
the modified extension into the Docker image, but that is a task
I can grapple with outside of this mailing list. :-)

I am happy to have learned a few things and thank you for your
help tom and Adrian.

Kind regards,

Adnan Dautovic

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-04-10 20:04:38 Re: Failure of postgres_fdw because of TimeZone setting
Previous Message Adnan Dautovic 2024-04-10 19:38:52 Re: Failure of postgres_fdw because of TimeZone setting