aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew White <pixeltrix@users.noreply.github.com>2016-04-23 20:57:41 +0100
committerAndrew White <pixeltrix@users.noreply.github.com>2016-04-23 20:57:41 +0100
commitcc7bd7cc394d0bbd9ead5763e077c8965c305755 (patch)
tree3692b6d08cd0b390e26371832e940226cd428b1a
parentee5e476aad791e41c97f2a833f41bb5899d5252b (diff)
parentabeabdbc881f3c992e50f053c94c36749a2e8226 (diff)
downloadrails-cc7bd7cc394d0bbd9ead5763e077c8965c305755.tar.gz
rails-cc7bd7cc394d0bbd9ead5763e077c8965c305755.tar.bz2
rails-cc7bd7cc394d0bbd9ead5763e077c8965c305755.zip
Merge pull request #24699 from vipulnsward/to_time_cleanup
Follow up of https://github.com/rails/rails/commit/c9c5788a527b70d7f9…
-rw-r--r--activesupport/CHANGELOG.md2
-rw-r--r--activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb8
2 files changed, 5 insertions, 5 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index 45b6de55d1..2be567c2f7 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -30,7 +30,7 @@
* Add `ActiveSupport.to_time_preserves_timezone` config option to control
how `to_time` handles timezones. In Ruby 2.4+ the behavior will change
- from converting to the local system timezone to preserving the timezone
+ from converting to the local system timezone, to preserving the timezone
of the receiver. This config option defaults to false so that apps made
with earlier versions of Rails are not affected when upgrading, e.g:
diff --git a/activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb b/activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb
index b8eb587390..59aa3ccac2 100644
--- a/activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb
+++ b/activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb
@@ -1,12 +1,12 @@
module DateAndTime
module Compatibility
- # If true, +to_time+ preserves the the timezone offset.
+ # If true, +to_time+ preserves the timezone offset of receiver.
#
# NOTE: With Ruby 2.4+ the default for +to_time+ changed from
- # converting to the local system time to preserving the offset
+ # converting to the local system time, to preserving the offset
# of the receiver. For backwards compatibility we're overriding
- # this behavior but new apps will have an initializer that sets
- # this to true because the new behavior is preferred.
+ # this behavior, but new apps will have an initializer that sets
+ # this to true, because the new behavior is preferred.
mattr_accessor(:preserve_timezone, instance_writer: false) { false }
def to_time