In the first case your end result is a TIMESTAMP WITH TIME ZONE, and in
the second case, the result is converted from TIMESTAMP [WITHOUT TIME
ZONE] to a TIMESTAMP WITH TIME ZONE and then back to a TIMESTAMP
[WITHOUT TIME ZONE].
If you want the behaviour you expect, you should declare the function to
return TIMESTAMP WITH TIME ZONE.
As an aside, the body of your stored procedure can be simplified to
RETURN GIVEN_TS AT TIME ZONE 'UTC';
There is no need for a select, nor is there a need for a cast, nor an
intermediate RESULT variable..
Mark
--
Mark Rotteveel