Hey,
We are facing an issue:
Suppose table PRODUCT with column VERSION TIMESTAMP(6) WITH LOCAL TIME ZONE
when I call SELECT * FROM PRODUCT as user with SESSIONTIMEZONE=Europe/Prague it returns 24.09.24 15:13
We have a periodic DBMS_SCHEDULER JOB where we rely on same timezone=Europe/Prague, which can be simulated as
BEGIN
DBMS_SCHEDULER.RUN_JOB('JEF_Prosperita_Calc', FALSE); -- means USE_CURRENT_SESSION = false, resulting taking from system settings
END;
/
The query inside scheduler returns 24.09.24 13:13, meaning it does not respect the value of DBTIMEZONE
I tried to set it up using docker environment variables
sqlplus -s / as sysdba << EOF
-- Root container setup
SET SERVEROUTPUT ON;
SELECT SYS_CONTEXT('USERENV', 'CON_NAME') AS current_container FROM DUAL;
ALTER DATABASE SET TIME_ZONE = 'Europe/Prague';
BEGIN
DBMS_SCHEDULER.SET_SCHEDULER_ATTRIBUTE (
attribute => 'default_timezone',
value => 'Europe/Prague'); -- Replace with your preferred timezone
END;
/
SELECT DBTIMEZONE FROM DUAL;
DECLARE
val VARCHAR2(100);
BEGIN
DBMS_SCHEDULER.GET_SCHEDULER_ATTRIBUTE('default_timezone', val);
DBMS_OUTPUT.PUT_LINE('Root Default Timezone: ' || val);
END;
/
-- Commit the change
SHUTDOWN IMMEDIATE;
STARTUP;
SET SERVEROUTPUT ON;
SELECT SYS_CONTEXT('USERENV', 'CON_NAME') AS current_container FROM DUAL;
SELECT DBTIMEZONE FROM DUAL;
DECLARE
val VARCHAR2(100);
BEGIN
DBMS_SCHEDULER.GET_SCHEDULER_ATTRIBUTE('default_timezone', val);
DBMS_OUTPUT.PUT_LINE('Root Default Timezone: ' || val);
END;
/
exit;
EOF
Hey, We are facing an issue: Suppose table PRODUCT with column
VERSION TIMESTAMP(6) WITH LOCAL TIME ZONE
when I callSELECT * FROM PRODUCT
as user withSESSIONTIMEZONE=Europe/Prague
it returns24.09.24 15:13
We have a periodic DBMS_SCHEDULER JOB where we rely on same timezone=Europe/Prague, which can be simulated as
The query inside scheduler returns
24.09.24 13:13
, meaning it does not respect the value of DBTIMEZONEI tried to set it up using docker environment variables
Also i tried to use init sh script
Is there another way to set it up?
Thanks for any advice.