diff options
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index c4bd2c8a04..3fb1655526 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -451,8 +451,6 @@ module ActiveRecord case res.type(cel_index) when BYTEA_COLUMN_TYPE_OID column = unescape_bytea(column) - when TIMESTAMPTZOID, TIMESTAMPOID - column = cast_to_time(column) when NUMERIC_COLUMN_TYPE_OID column = column.to_d if column.respond_to?(:to_d) end @@ -579,14 +577,6 @@ module ActiveRecord # and we can't know the value of that, so return nil. return nil end - - # Only needed for DateTime instances - def cast_to_time(value) - return value unless value.class == DateTime - v = value - time_array = [v.year, v.month, v.day, v.hour, v.min, v.sec, v.usec] - Time.send(Base.default_timezone, *time_array) rescue nil - end end end end |