diff options
author | amitkumarsuroliya <amitkumarsuroliya@gmail.com> | 2015-09-15 00:42:25 +0530 |
---|---|---|
committer | amitkumarsuroliya <amitkumarsuroliya@gmail.com> | 2015-09-15 00:44:22 +0530 |
commit | 4818f3e1ae09e52f73be467d5547a3c2627c2131 (patch) | |
tree | 9eca1bbe8036dd6e9c14eea7b19420a81152db66 /activesupport/lib/active_support/values | |
parent | c33f51a89437b0b8eeb6288a460175c26b572aa6 (diff) | |
download | rails-4818f3e1ae09e52f73be467d5547a3c2627c2131.tar.gz rails-4818f3e1ae09e52f73be467d5547a3c2627c2131.tar.bz2 rails-4818f3e1ae09e52f73be467d5547a3c2627c2131.zip |
Improve Docs of ActiveSupport::TimeZone [ci skip]
`TimeZone` class is a part of `ActiveSupport` module. For Accessing `TimeZone` class, we need to call `ActiveSupport::TimeZone` instead of `TimeZone`.
individual `TimeZone` gives `NameError: uninitialized constant ‘TimeZone’ error
Diffstat (limited to 'activesupport/lib/active_support/values')
-rw-r--r-- | activesupport/lib/active_support/values/time_zone.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index 2699a064d7..c8dbe92171 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -23,7 +23,7 @@ module ActiveSupport # config.time_zone = 'Eastern Time (US & Canada)' # end # - # Time.zone # => #<TimeZone:0x514834...> + # Time.zone # => #<ActiveSupport::TimeZone:0x514834...> # Time.zone.name # => "Eastern Time (US & Canada)" # Time.zone.now # => Sun, 18 May 2008 14:30:44 EDT -04:00 # @@ -195,7 +195,7 @@ module ActiveSupport # Assumes self represents an offset from UTC in seconds (as returned from # Time#utc_offset) and turns this into an +HH:MM formatted string. # - # TimeZone.seconds_to_utc_offset(-21_600) # => "-06:00" + # ActiveSupport::TimeZone.seconds_to_utc_offset(-21_600) # => "-06:00" def seconds_to_utc_offset(seconds, colon = true) format = colon ? UTC_OFFSET_WITH_COLON : UTC_OFFSET_WITHOUT_COLON sign = (seconds < 0 ? '-' : '+') |