ptrdom commented on code in PR #534:
URL: 
https://github.com/apache/pekko-persistence-r2dbc/pull/534#discussion_r4398459449


##########
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:
   I am also starting to consider that maybe we should allow the user to break 
out of this behavior by setting they own options in customizer. Maybe we could 
log a warning about it, but I think it could be beneficial to the user to allow 
overriding any options that the library sets for whatever reason. What do you 
think?



-- 
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]

Reply via email to