ptrdom commented on code in PR #534:
URL:
https://github.com/apache/pekko-persistence-r2dbc/pull/534#discussion_r4398495332
##########
core/src/main/scala/org/apache/pekko/persistence/r2dbc/ConnectionFactoryProvider.scala:
##########
@@ -185,7 +186,15 @@ class ConnectionFactoryProvider(system: ActorSystem[?])
extends Extension {
builder.option(Option.valueOf("connectionTimeZone"), "SERVER")
}
- ConnectionFactories.get(customizer(builder, config).build())
+ if (MariaDBConnections.isMariaDB(builder.build())) {
+ // Instants are bound and read as UTC LocalDateTime, see
MariaDBConnections
+ builder.option(MariaDBConnections.TimezoneOption, "UTC")
+ }
+
+ val options = customizer(builder, config).build()
+ val connectionFactory = ConnectionFactories.get(options)
Review Comment:
Ah, this then needs timestamp correction code to follow the customizer
setting. We could allow fixed offsets, but anything but that would be a
problem. So maybe this is more trouble than it is worth.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]