Continued from #2
Timestamps fetched by oracledb
have different values that those fetched by cx_Oracle
. Using alter session set time_zone
doesn't make a difference.
Python 3.10.4 (main, Apr 26 2022, 19:42:59) [Clang 13.1.6 (clang-1316.0.21.2)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.3.0 -- An enhanced Interactive Python. Type '?' for help.
๐ โ 1 โฏ odb = oracledb.connect("user/pwd@db")
๐ โ 2 โฏ cdb = cx_Oracle.connect("user/pwd@db")
๐ โ 3 โฏ oc = odb.cursor()
๐ โ 4 โฏ cc = cdb.cursor()
๐ โ 5 โฏ oc.execute("alter session set time_zone='Europe/Berlin'")
๐ โ 6 โฏ cc.execute("alter session set time_zone='Europe/Berlin'")
๐ โ 7 โฏ cc.execute("select start_date from dba_scheduler_jobs where job_name = 'LOG_CLEANUP_JOB'").fetchone()
๐ โ 7 โฎ (datetime.datetime(2019, 3, 26, 4, 33),)
๐ โ 8 โฏ oc.execute("select start_date from dba_scheduler_jobs where job_name = 'LOG_CLEANUP_JOB'").fetchone()
๐ โ 8 โฎ (datetime.datetime(2019, 3, 26, 2, 33),)
๐ โ 9 โฏ
The script
import sys, platform, oracledb print(f"{platform.platform()=}") print(f"{sys.maxsize > 2**32=}") print(f"{platform.python_version()=}") print(f"{oracledb.__version__=}")
gives the following output on my machine:
platform.platform()='macOS-12.4-x86_64-i386-64bit'
sys.maxsize > 2**32=True
platform.python_version()='3.10.4'
oracledb.__version__='1.0.0'
I'm using oracledb
in thin mode.
The following Oracle related environment variables are set:
export ORACLE_HOME=~/oracle/instantclient_12_2 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$ORACLE_HOME export PATH=$PATH:$ORACLE_HOME export NLS_LANG=GERMAN_GERMANY.AL32UTF8
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4