diff options
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/type/date_time.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/type/date_time.rb b/activerecord/lib/active_record/type/date_time.rb index 5f19608a33..0a737815bc 100644 --- a/activerecord/lib/active_record/type/date_time.rb +++ b/activerecord/lib/active_record/type/date_time.rb @@ -11,7 +11,11 @@ module ActiveRecord zone_conversion_method = ActiveRecord::Base.default_timezone == :utc ? :getutc : :getlocal if value.acts_like?(:time) - value.send(zone_conversion_method) + if value.respond_to?(zone_conversion_method) + value.send(zone_conversion_method) + else + value + end else super end |