When a timestamp with negative time zone minute offset such as -03:30 is fetched, dpiTimestamp.tzMinuteOffset is negative. However when the fetched timestamp is set to dpiData_setTimestamp, dpiStmt_execute fails with ORA-01875: time zone minute must be between -59 and 59.
I made a test program.
https://gist.github.com/kubo/3d8cfb06a71454d137e3014475e62674
It printed:
Timestamp value:
year: 2017
month: 1
day: 1
hour: 0
minute: 0
second: 0
fsecond 0
tzHourOffset: -3
tzMinuteOffset: -30
ERROR at line 84
dpiStmt_execute(stmt, 0, &numQueryColumns)
ORA-01875: time zone minute must be between -59 and 59
This issue is fixed if ts.tzMinuteOffset in this line is replaced with abs(ts.tzMinuteOffset). However this is strange workaround.
When a timestamp with negative time zone minute offset such as
-03:30is fetched,dpiTimestamp.tzMinuteOffsetis negative. However when the fetched timestamp is set todpiData_setTimestamp,dpiStmt_executefails withORA-01875: time zone minute must be between -59 and 59.I made a test program.
https://gist.github.com/kubo/3d8cfb06a71454d137e3014475e62674
It printed:
This issue is fixed if
ts.tzMinuteOffsetin this line is replaced withabs(ts.tzMinuteOffset). However this is strange workaround.