diff options
author | Geoff Buesing <gbuesing@gmail.com> | 2008-02-10 22:46:31 +0000 |
---|---|---|
committer | Geoff Buesing <gbuesing@gmail.com> | 2008-02-10 22:46:31 +0000 |
commit | c9402b2277b18e65064720cc9ebf272a321de1ff (patch) | |
tree | b65600cf4405d49522e54f0fac688614db8da13c /activerecord/lib/active_record/base.rb | |
parent | 6608a3ef37a8f998958b867a1be186d33edbc151 (diff) | |
download | rails-c9402b2277b18e65064720cc9ebf272a321de1ff.tar.gz rails-c9402b2277b18e65064720cc9ebf272a321de1ff.tar.bz2 rails-c9402b2277b18e65064720cc9ebf272a321de1ff.zip |
Multiparameter attributes for time columns fail over to DateTime when out of range of Time
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8855 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index f273c04a94..642a7e2b96 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -2472,12 +2472,11 @@ module ActiveRecord #:nodoc: ) end - # Includes an ugly hack for Time.local instead of Time.new because the latter is reserved by Time itself. def instantiate_time_object(name, values) if Time.zone && !self.class.skip_time_zone_conversion_for_attributes.include?(name.to_sym) Time.zone.local(*values) else - @@default_timezone == :utc ? Time.utc(*values) : Time.local(*values) + @@default_timezone == :utc ? Time.utc_time(*values) : Time.local_time(*values) end end |