Added support for the ORA_SDTZ environment variable used to set the

session time zone used by the database.
This commit is contained in:
Anthony Tuininga 2023-05-09 16:49:31 -06:00
parent 2832df5102
commit c59e6a2750
2 changed files with 13 additions and 9 deletions

View File

@ -13,6 +13,8 @@ oracledb 1.4.0 (TBD)
Thin Mode Changes
+++++++++++++++++
#) Added support for the ``ORA_SDTZ`` environment variable used to set the
session time zone used by the database.
#) Added support for shrinking the pool back to the minimum number of
connections allowed in the pool when the pool is idle for
:data:`ConnectionPool.timeout` seconds.

View File

@ -1394,6 +1394,8 @@ cdef class AuthMessage(Message):
cdef:
int tz_hour, tz_minute, timezone
str sign, tz_repr
tz_repr = os.environ.get("ORA_SDTZ")
if tz_repr is None:
timezone = -time.altzone if time.daylight else -time.timezone
tz_hour = timezone // 3600
tz_minute = (timezone - (tz_hour * 3600)) // 60