On Wednesday, December 2, 2020 at 2:36:09 PM UTC-6 Jeremy Evans wrote:

> Unfortunately, there is no way for Sequel to fix this.  When using the 
> mysql2 driver, it handles the timezone conversion and Sequel never sees the 
> original string sent by the database server, so it cannot handle the 
> conversion correctly.
>

Bummer.
 

> I can fix the warning in Sequel, but unfortunately, that's all I can do.  
> If you want mysql2 to support named timezones for :database_timezone, 
> you'll have to file an issue with them or send them a pull request (
> https://github.com/brianmario/mysql2/issues).
>

OK, created:

  https://github.com/brianmario/mysql2/issues/1148

  Starting in Ruby 2.6 it should be possible for mysql2 to use Ruby's 
> timezone support to implement the named timezone support.
>

 OK, or what about another mode (e.g., :passthrough) that would make Mysql2 
get out of the way and let it be handled in Sequel?

One of my deployment targets is RHEL 7, and Ruby is at 2.0 there, so it 
would be great if that could still be used and not require 2.6.

Note that you can use the mysql adapter and it handles the conversion 
> correctly, since Sequel handles the type conversion in that case instead of 
> the driver.  However, you'll have to patch the mysql gem to run on Ruby 
> 2.4+.  Here's an example of such a patch: 
> https://raw.githubusercontent.com/openbsd/ports/master/databases/ruby-mysql/patches/patch-ext_mysql_api_mysql_c
>
 
Thanks for that!  I would be perfectly happy to switch to the mysql adapter 
if the mysql gem were maintained, but sadly it appears to be looking for a 
maintainer and not accepting any code changes based on the README.md 
message and last commit timestamp at

  https://github.com/luislavena/mysql-gem

and issue #33

  https://github.com/luislavena/mysql-gem/issues/33

Having to patch it is a real pain since I wouldn't be able to get it via 
RubyGems.org. :-(

Thank you!

Lewis

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/630a1cd9-a00d-439f-8d78-c844821d8bfcn%40googlegroups.com.

Reply via email to