Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The original time zone should be set to the current time zone at routine invocation [CORE6034] #6284

Closed
firebird-issue-importer opened this issue Mar 21, 2019 · 4 comments

Comments

@firebird-issue-importer

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.

------------
execute block returns (t1 timestamp with time zone, t2 timestamp with time zone)
as
declare procedure p0 returns (t1 timestamp with time zone, t2 timestamp with time zone)
as
begin
set time zone 'America/New_York';
t1 = current_timestamp;
set time zone local;
t2 = current_timestamp;
end

declare procedure p1 returns (t1 timestamp with time zone, t2 timestamp with time zone)
as
begin
set time zone 'America/Los_Angeles';

execute procedure p0 returning\_values t1, t2;

end
begin
-- Initial time zone: 'America/Sao_Paulo';

execute procedure p1 returning_values t1, t2;
suspend;
end!
------------

Commits: a64b202

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 21, 2019

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 26, 2019

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 4.0 Beta 2 [ 10888 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 8, 2019

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Done successfully

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 8, 2019

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants