On Sep 16, 7:17 pm, "Michael Koziarski" <[EMAIL PROTECTED]> wrote: > On Tue, Sep 16, 2008 at 6:04 AM, Clifford Heath wrote: > > I have a related problem, using a secondary database connection, set > > up using self.abstract_class = true > > I read records from the 2ary DB, and the datetimes are in localtime, > > and when they get saved to the main DB, get converted to UTC. > I can't see how the current code would break this case,
I posted before enough exploration. The problem is that the sqlserver adapter doesn't use Base.default_timezone so is incompatible with Rails 2.1 - any date read from a record, assigned to another and saved will have the timezone delta subtracted. It's not a 2-database problem, it's just an sqlserver adapter problem... The problem is in its cast_to_datetime() method. Patch forthcoming :-). > I believe that the sqlserver adapter has (had?) custom logic for this > kind of conversion. If the time is 0, return a date, etc. Yep, it's kinda arbitrary, limited and generally crappy. I'll see if I can come up with a better suggestion. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---