From 66c32eae1b33fd432b2cc21ff0158f1081dc88b7 Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Wed, 16 Jan 2013 12:51:34 +1100 Subject: Small comment edit in timezone_fixes to remind that this can be removed in Rails 3.x --- lib/timezone_fixes.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/timezone_fixes.rb') diff --git a/lib/timezone_fixes.rb b/lib/timezone_fixes.rb index e6d2f9470..1bf326ccd 100644 --- a/lib/timezone_fixes.rb +++ b/lib/timezone_fixes.rb @@ -4,7 +4,9 @@ # Otherwise times get stored wrong during British Summer Time -# Hopefully fixed in later Rails. There is a test in spec/libs/timezone_fixes.rb +# Hopefully fixed in later Rails. There is a test in spec/lib/timezone_fixes_spec.rb + +# This fix is applied in Rails 3.x. So, should be possible to remove this then! # Monkeypatch! module ActiveRecord -- cgit v1.2.3 From eef9d83ff28b9d3fdea11dabfab465adefbdf683 Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Fri, 25 Jan 2013 13:53:20 +1100 Subject: Remove timezone monkeypatch fixes because they're not necessary in Rails 3 anymore --- lib/timezone_fixes.rb | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 lib/timezone_fixes.rb (limited to 'lib/timezone_fixes.rb') diff --git a/lib/timezone_fixes.rb b/lib/timezone_fixes.rb deleted file mode 100644 index 1bf326ccd..000000000 --- a/lib/timezone_fixes.rb +++ /dev/null @@ -1,26 +0,0 @@ -# Taken from -# https://rails.lighthouseapp.com/projects/8994/tickets/2946 -# http://github.com/rails/rails/commit/6f97ad07ded847f29159baf71050c63f04282170 - -# Otherwise times get stored wrong during British Summer Time - -# Hopefully fixed in later Rails. There is a test in spec/lib/timezone_fixes_spec.rb - -# This fix is applied in Rails 3.x. So, should be possible to remove this then! - -# Monkeypatch! -module ActiveRecord - module ConnectionAdapters # :nodoc: - module Quoting - def quoted_date(value) - if value.acts_like?(:time) - zone_conversion_method = ActiveRecord::Base.default_timezone == :utc ? :getutc : :getlocal - value.respond_to?(zone_conversion_method) ? value.send(zone_conversion_method) : value - else - value - end.to_s(:db) - end - end - end -end - -- cgit v1.2.3