aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Agrawal <arunagw@gmail.com>2013-07-03 19:40:24 +0200
committerArun Agrawal <arunagw@gmail.com>2013-07-03 19:40:24 +0200
commit028f91277defa7742c78788db69db3082b4f70e0 (patch)
tree24dca138d7b27e25130144e059272b9256e3eab6
parentf3f7f31407eacc8d44b550aaa773ae802979f8ed (diff)
downloadrails-028f91277defa7742c78788db69db3082b4f70e0.tar.gz
rails-028f91277defa7742c78788db69db3082b4f70e0.tar.bz2
rails-028f91277defa7742c78788db69db3082b4f70e0.zip
Remove deprecated `DateTime.local_offset`
-rw-r--r--activesupport/CHANGELOG.md4
-rw-r--r--activesupport/lib/active_support/core_ext/date_time/calculations.rb7
2 files changed, 4 insertions, 7 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index 4fa22f42c3..17481e1389 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -1,3 +1,7 @@
+* Remove deprecated `DateTime.local_offset` in favor of `DateTime.civil_from_fromat`.
+
+ *Arun Agrawal*
+
* Remove deprecated `Logger` core extensions (`core_ext/logger.rb`).
*Carlos Antonio da Silva*
diff --git a/activesupport/lib/active_support/core_ext/date_time/calculations.rb b/activesupport/lib/active_support/core_ext/date_time/calculations.rb
index 937567440b..ff59be0022 100644
--- a/activesupport/lib/active_support/core_ext/date_time/calculations.rb
+++ b/activesupport/lib/active_support/core_ext/date_time/calculations.rb
@@ -3,13 +3,6 @@ require 'active_support/deprecation'
class DateTime
class << self
- # *DEPRECATED*: Use +DateTime.civil_from_format+ directly.
- def local_offset
- ActiveSupport::Deprecation.warn 'DateTime.local_offset is deprecated. Use DateTime.civil_from_format directly.'
-
- ::Time.local(2012).utc_offset.to_r / 86400
- end
-
# Returns <tt>Time.zone.now.to_datetime</tt> when <tt>Time.zone</tt> or
# <tt>config.time_zone</tt> are set, otherwise returns
# <tt>Time.now.to_datetime</tt>.