diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-08-26 08:59:53 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-08-26 08:59:53 +0200 |
commit | 479217ca34e3eb1f86fa8e8358bdde9de16effaf (patch) | |
tree | 125fc407a78ad92b23d9cffd100e1b6eb196cb55 /activesupport/lib | |
parent | 51c7ac142d31095d4c699f44cc44ddea627da1eb (diff) | |
parent | 1be7fcad6b9aec42380f719ce1e47888a70d9152 (diff) | |
download | rails-479217ca34e3eb1f86fa8e8358bdde9de16effaf.tar.gz rails-479217ca34e3eb1f86fa8e8358bdde9de16effaf.tar.bz2 rails-479217ca34e3eb1f86fa8e8358bdde9de16effaf.zip |
Merge pull request #21380 from ronakjangir47/fix_docs
Fixed to_datetime docs [ci skip]
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/time_with_zone.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index 5dd9c423e3..817522677f 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -369,9 +369,10 @@ module ActiveSupport utc.to_time end - # Returns an instance of DateTime in the UTC timezone. + # Returns an instance of DateTime with the timezone's UTC offset # - # Time.zone.now.to_datetime # => Tue, 18 Aug 2015 02:32:20 +0000 + # Time.zone.now.to_datetime # => Tue, 18 Aug 2015 02:32:20 +0000 + # Time.current.in_time_zone('Hawaii').to_datetime # => Mon, 17 Aug 2015 16:32:20 -1000 def to_datetime utc.to_datetime.new_offset(Rational(utc_offset, 86_400)) end |