oracle / oracle-r2dbc

R2DBC Driver for Oracle Database
https://oracle.com
Other
194 stars 40 forks source link

Support oracle.jdbc.timezoneAsRegion driver parameter #79

Closed osi closed 1 year ago

osi commented 2 years ago

When using the docker image provided at https://registry.hub.docker.com/r/gvenzl/oracle-xe with Testcontainers, specifically the gvenzl/oracle-xe:11-slim image, connections fail if the JVM's timezone is set to Etc/UTC.

Setting the property oracle.jdbc.timezoneAsRegion as a system property, as described here, https://gist.github.com/jarek-przygodzki/cbea3cedae3aef2bbbe0ff6b057e8321 is a fix.

It would be nice if this property were supported directly by this driver, so it could be scoped to the connection.

Michael-A-McMahon commented 2 years ago

@osi, thank you for showing me this!

I can easily add an extended option for oracle.jdbc.timezoneAsRegion. I'll plan to do that as I sink some time into Oracle R2DBC this week.

Also, just wanted to note that Oracle R2DBC is only verified with Oracle Database versions 18 and newer. I believe the docker image you have is version 11.x.

osi commented 2 years ago

Thanks! Yes, the image is for 11.x, as we have an instance running this version in production.

I understand that Oracle R2DBC is only verified with v18 and higher. Thankfully we can verify our interactions with the docker image to get some confidence against this older version. Our usage of this is also as a part of migrating off of this older version as well. As famous last words, we hopefully won't be running in this configuration for too long 😀