The expected created_at value should be 2020-05-08 19:37:01 UTC or at least 2020-05-08 16:37:01 -0300.
I started debugging inside activerecord and activemodel gems before I finally reached here. I saw that ArJdbc::Abstract::DatabaseStatements.exec_query method already returns the column created_at as a Time in UTC but with the wrong time.
FYI: I tested the same example with activerecord 4 and activerecord-jdbcmysql-adapter 1.3.25 and the result was the expected.
I have a non Rails app where we recently upgraded from activerecord 4 to 5, and we start having this issue:
The expected
created_at
value should be2020-05-08 19:37:01 UTC
or at least2020-05-08 16:37:01 -0300
.I started debugging inside
activerecord
andactivemodel
gems before I finally reached here. I saw thatArJdbc::Abstract::DatabaseStatements.exec_query
method already returns the columncreated_at
as a Time in UTC but with the wrong time.FYI: I tested the same example with
activerecord 4
andactiverecord-jdbcmysql-adapter 1.3.25
and the result was the expected.Versions jruby: 9.2.7.0 activerecord-jdbcmysql-adapter (52.4-java) activerecord-jdbc-adapter (= 52.4) jdbc-mysql (~> 5.1.36, < 9) -> jdbc-mysql (5.1.47)