On Sep 27, 10:22 am, rohit <[email protected]> wrote:
> We are importing data from one DB to another. The source DB (MySQL)
> has several tables that store timestamps in UTC in datetime columns.
> The destination DB (SQL Server) needs to store timestamps in the local
> timezone. Sequel.application_timezone and Sequel.database_timezone are
> global so the timestamp is converted to local on read and back to utc
> on write. Is there a way to accomplish this without having to modify
> the code that does the import to identify/convert datetime columns
> before they are written?

Currently, because the setting is global, there is unlikely to be a
better way.  The correct way to accomplish this is to make the
database timezone setting an instance method on the Database object.
There are various issues involved with that, with the main one being
type translation in the adapters, but it should be possible without
major surgery.  It's a bit late in the release cycle for me to attempt
such changes now, so they won't make 3.28.0, but I'll try to make sure
they are in place before 3.29.0.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to