Skip to content

Commit 46f81b0

Browse files
Fixed bug in detecting the current time zone (#257).
1 parent 065fc51 commit 46f81b0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

doc/src/release_notes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ oracledb 2.0.0 (TBD)
1313
Thin Mode Changes
1414
+++++++++++++++++
1515

16+
#) Fixed bug in detecting the current time zone
17+
(`issue 257 <https://github.com/oracle/python-oracledb/issues/257>`__).
1618
#) Fixed bug in handling database response in certain unusual circumstances.
1719
#) Fixed bug in handling exceptions raised during connection establishment.
1820
#) Fixed bug in identifying bind variables in SQL statements containing

src/oracledb/impl/thin/messages.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1457,7 +1457,7 @@ cdef class AuthMessage(Message):
14571457
str sign, tz_repr
14581458
tz_repr = os.environ.get("ORA_SDTZ")
14591459
if tz_repr is None:
1460-
timezone = -time.altzone if time.daylight else -time.timezone
1460+
timezone = time.localtime().tm_gmtoff
14611461
tz_hour = timezone // 3600
14621462
tz_minute = (timezone - (tz_hour * 3600)) // 60
14631463
if tz_hour < 0:

0 commit comments

Comments
 (0)