aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/types/time_with_zone.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/types/time_with_zone.rb')
-rw-r--r--activerecord/lib/active_record/types/time_with_zone.rb20
1 files changed, 0 insertions, 20 deletions
diff --git a/activerecord/lib/active_record/types/time_with_zone.rb b/activerecord/lib/active_record/types/time_with_zone.rb
deleted file mode 100644
index 3a8b9292f9..0000000000
--- a/activerecord/lib/active_record/types/time_with_zone.rb
+++ /dev/null
@@ -1,20 +0,0 @@
-module ActiveRecord
- module Type
- class TimeWithZone < Object
-
- def cast(time)
- time = super(time)
- time.acts_like?(:time) ? time.in_time_zone : time
- end
-
- def precast(time)
- unless time.acts_like?(:time)
- time = time.is_a?(String) ? ::Time.zone.parse(time) : time.to_time rescue time
- end
- time = time.in_time_zone rescue nil if time
- super(time)
- end
-
- end
- end
-end