Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> TIMESTAMP in Object Type Bug

TIMESTAMP in Object Type Bug

From: Björn Wächter <bwc_at_p3-solutionsKILL_SPAM.de>
Date: Wed, 13 Sep 2006 13:57:23 +0200
Message-ID: <4mqa14F7dr3gU1@news.dfncis.de>


Hello,

I have a problem with a timestamp with timezone in an object type. What I do is. Create a type like this:

CREATE OR REPLACE
TYPE OBJ_TIMESTAMP AS OBJECT (
TEST_TS TIMESTAMP(3) WITH LOCAL TIME ZONE );

Create a function returning such an object:

CREATE OR REPLACE FUNCTION OBJ_CURRENT_TIME RETURN OBJ_TIMESTAMP
IS

   v_return OBJ_TIMESTAMP;
BEGIN     v_return := OBJ_TIMESTAMP(CURRENT_TIMESTAMP);

    RETURN v_return;         

END OBJ_CURRENT_TIME; If my session timezone is:

SELECT sessiontimezone FROM DUAL;

SESSIONTIMEZONE



+02:00

Everything works just fine like expected:

SELECT OBJ_CURRENT_TIME().TEST_TS from dual;

OBJ_CURRENT_TIME().TEST_TS



13-SEP-06 01.53.30.693845 PM But if a change to CET:

ALTER SESSION SET TIME_ZONE = 'CET'; SELECT sessiontimezone FROM DUAL;

SESSIONTIMEZONE



CET and execute the same again:

SELECT OBJ_CURRENT_TIME().TEST_TS from dual;

OBJ_CURRENT_TIME().TEST_TS



11--48 05.02.01.086455 PM

I'm facing this problem in 10.1.0.4 and 10.2.0.1

Am I doing something wrong with the object or is it a bug?

Thanks Björn Received on Wed Sep 13 2006 - 06:57:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US