diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-09-12 16:22:40 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-09-12 16:22:40 -0300 |
commit | f3ff72bc7728f1df3dc25d88f4c2c8afa998751c (patch) | |
tree | a3c3807fb22d185ff257365610faea9d481d8efb | |
parent | 33e7b3d9c1a5362d6739faa43796ffb6cec0d09c (diff) | |
parent | 7251533f78bf8410733fb71ffe514adfd2d74ebf (diff) | |
download | rails-f3ff72bc7728f1df3dc25d88f4c2c8afa998751c.tar.gz rails-f3ff72bc7728f1df3dc25d88f4c2c8afa998751c.tar.bz2 rails-f3ff72bc7728f1df3dc25d88f4c2c8afa998751c.zip |
Merge pull request #21604 from amitsuroliya/remove_wrong_docs
Improving `in_time_zone` docs [ci skip]
-rw-r--r-- | activesupport/lib/active_support/core_ext/date_and_time/zones.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/date_and_time/zones.rb b/activesupport/lib/active_support/core_ext/date_and_time/zones.rb index 96c6df9407..d29a8db5cf 100644 --- a/activesupport/lib/active_support/core_ext/date_and_time/zones.rb +++ b/activesupport/lib/active_support/core_ext/date_and_time/zones.rb @@ -4,7 +4,7 @@ module DateAndTime # if Time.zone_default is set. Otherwise, it returns the current time. # # Time.zone = 'Hawaii' # => 'Hawaii' - # DateTime.utc(2000).in_time_zone # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # Time.utc(2000).in_time_zone # => Fri, 31 Dec 1999 14:00:00 HST -10:00 # Date.new(2000).in_time_zone # => Sat, 01 Jan 2000 00:00:00 HST -10:00 # # This method is similar to Time#localtime, except that it uses <tt>Time.zone</tt> as the local zone @@ -14,7 +14,6 @@ module DateAndTime # and the conversion will be based on that zone instead of <tt>Time.zone</tt>. # # Time.utc(2000).in_time_zone('Alaska') # => Fri, 31 Dec 1999 15:00:00 AKST -09:00 - # DateTime.utc(2000).in_time_zone('Alaska') # => Fri, 31 Dec 1999 15:00:00 AKST -09:00 # Date.new(2000).in_time_zone('Alaska') # => Sat, 01 Jan 2000 00:00:00 AKST -09:00 def in_time_zone(zone = ::Time.zone) time_zone = ::Time.find_zone! zone |