On Apr 19, 3:25 am, Roland Swingler <[email protected]> wrote: > Hi, > > I'm wondering how I should handle timestamps such as "0000-00-00 > 00:00:00", which is a valid timestamp in Mysql. Trying to access them > through a dataset gives me a Sequel::InvalidValue error: > > Sequel::InvalidValue: ArgumentError: argument out of range > /opt/local/lib/ruby/1.8/time.rb:184:in `local' > /opt/local/lib/ruby/1.8/time.rb:184:in `make_time' > /opt/local/lib/ruby/1.8/time.rb:243:in `parse' > /opt/local/lib/ruby/gems/1.8/gems/sequel-3.9.0/lib/sequel/core.rb: > 215:in `string_to_datetime' > /opt/local/lib/ruby/gems/1.8/gems/sequel-3.9.0/lib/sequel/ > timezones.rb:74:in `convert_input_timestamp' > /opt/local/lib/ruby/gems/1.8/gems/sequel-3.9.0/lib/sequel/ > timezones.rb:145:in `convert_timestamp' > /opt/local/lib/ruby/gems/1.8/gems/sequel-3.9.0/lib/sequel/ > timezones.rb:29:in `database_to_application_timestamp' > /opt/local/lib/ruby/gems/1.8/gems/sequel-3.9.0/lib/sequel/adapters/ > mysql.rb:52:in `send' > /opt/local/lib/ruby/gems/1.8/gems/sequel-3.9.0/lib/sequel/adapters/ > mysql.rb:52:in `convert_date_time' > ... > > Is this a bug or expected behaviour?
Expected behavior. You can use the following if you want different behavior: Sequel::MySQL.convert_invalid_date_time = nil # or :string 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.
