The original time zone should be set to the current time zone at routine invocation -----------------------------------------------------------------------------------
Key: CORE-6034 URL: http://tracker.firebirdsql.org/browse/CORE-6034 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 4.0 Beta 1 Reporter: Adriano dos Santos Fernandes 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! ------------ -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel