diff options
author | amitkumarsuroliya <amitkumarsuroliya@gmail.com> | 2015-09-18 17:26:02 +0530 |
---|---|---|
committer | amitkumarsuroliya <amitkumarsuroliya@gmail.com> | 2015-09-18 19:54:14 +0530 |
commit | 8913432b2831208d4a3face0b29b7f91de49fbe0 (patch) | |
tree | 469098572c5f46bfe9bf060013e62b2fcfb9d33b /activesupport | |
parent | 9e3ede7e14628f7c3f394899e2b4f48b9724a549 (diff) | |
download | rails-8913432b2831208d4a3face0b29b7f91de49fbe0.tar.gz rails-8913432b2831208d4a3face0b29b7f91de49fbe0.tar.bz2 rails-8913432b2831208d4a3face0b29b7f91de49fbe0.zip |
Corrected `to_time` output in ActiveSupport Date Conversion docs.Since https://github.com/rails/rails/commit/48583f8bf74d1cefefea3cd6591bd546a9eaff6c, to_time returns times formatted as YYYY-MM-DD HH:MM:SS UTC [ci skip]
`to_time` method now returns in `YYYY-MM-DD HH:MM:SS UTC` format.
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/date/conversions.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/core_ext/date/conversions.rb b/activesupport/lib/active_support/core_ext/date/conversions.rb index 31479a1269..ed8bca77ac 100644 --- a/activesupport/lib/active_support/core_ext/date/conversions.rb +++ b/activesupport/lib/active_support/core_ext/date/conversions.rb @@ -75,10 +75,10 @@ class Date # # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 # - # date.to_time # => Sat Nov 10 00:00:00 0800 2007 - # date.to_time(:local) # => Sat Nov 10 00:00:00 0800 2007 + # date.to_time # => 2007-11-10 00:00:00 0800 + # date.to_time(:local) # => 2007-11-10 00:00:00 0800 # - # date.to_time(:utc) # => Sat Nov 10 00:00:00 UTC 2007 + # date.to_time(:utc) # => 2007-11-10 00:00:00 UTC def to_time(form = :local) ::Time.send(form, year, month, day) end |