search for: string_to_tim

Displaying 7 results from an estimated 7 matches for "string_to_tim".

Did you mean: string_to_time
2005 Mar 03
12
bug in postgresql ''now'' time handling??
line 212 of postgresql_adapter.rb is return Time.now.to_s if value =~ /^\(''now''::text\)::(date|timestamp)/ i don''t think this will work. in postgresql the field ''now'' is pinned to the SAME TIME for the duration of a transaction. eg. if you do begin transaction; insert into t values(42, ''now''); # sleep one minute
2006 Jun 23
0
Multiparameter error
...Date class if Time fails, but I''m not sure exactly how to implement them. This is from the wiki require ''date'' # It''s necessary to do this, because Time doesn''t # support dates before 1970... class ActiveRecord::ConnectionAdapters::Column def self.string_to_time(string) return string unless string.is_a?(String) time_array = ParseDate.parsedate(string)[0..5] begin Time.send(Base.default_timezone, *time_array) rescue DateTime.new(*time_array) rescue nil end end end Any help would be appreciated Jeff -- Posted via http:/...
2005 Feb 19
0
[Error] Using validates_presence_of for datetime field causes parse error?
...me: 11776418931730081/4800000000,-5/24,2299161> /usr/lib/ruby/1.8/date/format.rb:238:in `_parse'' /usr/lib/ruby/1.8/parsedate.rb:9:in `parsedate'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.6.0/lib/active_record/ connection_adapters/abstract_adapter.rb:228:in `string_to_time'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.6.0/lib/active_record/ connection_adapters/abstract_adapter.rb:196:in `type_cast'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.6.0/lib/active_record/ base.rb:1054:in `read_attribute'' /usr/lib/ruby/gems/1.8/...
2010 Oct 13
10
Rails 2.3.8 - What happens to a datetime field between a form being submitted and the controller receiving the params
...the date string "13/10/2010" into this field its showing up in the controller as params[:clock][:time_keeper] "2010-10-13 23:00:00 UTC". I''ve tried overloading ActiveRecord::ConnectionAdapters::Column string_to_date(string) and ActiveRecord::ConnectionAdapters::Column string_to_time(string) but these seems to get hit when an object is saved not between the form submitting and the controller receiving the params object. Where is the mysterious 23:00:00 hours coming from? Can anyone point me to a good piece of reference reading for how dates and times work in rails land? Tha...
2007 Oct 07
0
Rails AR/Oracle Unit Test: [7769] failed (getting worse)
...rb:557:in `valid_civil?'' /usr/pkg/ruby184/lib/ruby/1.8/date.rb:1171:in `new'' ./test/../lib/active_record/connection_adapters/abstract/schema_definitions.rb:166:in `new_time'' ./test/../lib/active_record/connection_adapters/abstract/schema_definitions.rb:116:in `string_to_time'' ./test/../lib/active_record/connection_adapters/abstract/schema_definitions.rb:60:in `type_cast'' /usr/pkg/ruby184/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/connection_adapters/oracle_adapter.rb:70:in `type_cast'' ./test/../lib/active_record...
2007 Apr 24
1
strange frozen string problem starting rails
...8/date/format.rb:105:in `chomp!'' /usr/lib/ruby/1.8/date/format.rb:105:in `method_missing'' /usr/lib/ruby/1.8/date/format.rb:963:in `_parse'' /home/mlc/src/democracynow.org/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb:114:in `string_to_time'' /home/mlc/src/democracynow.org/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb:60:in `type_cast'' /home/mlc/src/democracynow.org/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb:22:in `in...
2009 May 05
3
Oracle-JRuby error
...w_date'' for JdbcSpec::Oracle::Column:Module C:/jruby-1.2.0/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9.1/lib/jdbc_adapter/jdbc_oracle.rb:63:in `guess_date_or_time'' C:/jruby-1.2.0/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9.1/lib/jdbc_adapter/jdbc_oracle.rb:59:in `string_to_time'' C:/jruby-1.2.0/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9.1/lib/jdbc_adapter/jdbc_oracle.rb:43:in `type_cast'' C:/jruby-1.2.0/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/dirty.rb:161:in `field_changed?'' C:/jruby-1.2.0/lib/ruby/gems/1.8/gems/acti...