Re: Time zone offset in to_char()

2024-01-12 Thread Alban Hertroijs
From: Adrian Klaver > I didn’t succeed in calling SET LOCAL TIMEZONE from within the function. > Could be I missed something, then Google (stackoverflow) pointed me to > set_config(). CREATE OR REPLACE FUNCTION public.tz_fnc() RETURNS void LANGUAGE plpgsql AS $function$ BEGIN SET

Re: Time zone offset in to_char()

2024-01-12 Thread Alban Hertroijs
_timestamp, '-MM-DD HH24:MI:SS.US0 TZH:TZM'); todatetimeoffsetnl | to_char + 2024-01-12 09:42:44.1989210 +01:00 | 2024-01-12 08:42:44.1989210 +00:00 (1 row) Regards, Alban Hertroijs.

Re: Time zone offset in to_char()

2024-01-11 Thread Alban Hertroijs
> In the above, I worked around the issue using a couple of user-defined > functions in PG. That should give a reasonable idea of the desired > functionality, but it's not an ideal solution to my problem: > 1). The first function has as a drawback that it changes the time zone for > the entire

Re: Time zone offset in to_char()

2024-01-11 Thread Alban Hertroijs
Am 11.01.2024 um 16:06 schrieb Alban Hertroijs : Hi all, I'm basically looking for a one-liner to convert a timestamptz (or a timestamp w/o time zone if that turns out to be more convenient) to a string format equal to what MS uses for their datetimeoffset type. I got almost

Time zone offset in to_char()

2024-01-11 Thread Alban Hertroijs
change to other calls within the same transaction? Any suggestions much appreciated. Groet, Alban Hertroijs Data engineer ∙ NieuweStroom aanwezig ma t/m vr, di tot 13:30 uur [Afbeelding met tekst, buiten, teken Automatisch gegenereerde beschrijving] www.nieuwestroom.nl<h