The original time zone should be set to the current time zone at routine invocation [CORE6034] #6284
Submitted by: @asfernandes
The standard says that at routine invocation, "the value of the original time zone displacement is set to the value of the current time zone displacement" during the call.
The original time zone cannot be changed by the user, but SET TIME ZONE TO LOCAL resets the current time zone to the original one.
So in fact the standard expects that the code below returns "America/New_York, America/Los_Angeles" but we instead return "America/New_York, America/Sao_Paulo".
We have some complications (like selectable procedure or execute statements) that should also be taken into account.
declare procedure p1 returns (t1 timestamp with time zone, t2 timestamp with time zone)
execute procedure p1 returning_values t1, t2;
The text was updated successfully, but these errors were encountered: