rails
https://github.com/rails/rails
Ruby
Ruby on Rails
DateTime#to_time
Either return an instance of `Time` with the same UTC offset as +self+ or an instance of `Time` representing the same time in the the local system timezone depending on the setting of on the setting of +ActiveSupport.to_time_preserves_timezone+.
Edit
git clone [email protected]:rails/rails.git
cd rails
open activesupport/lib/active_support/core_ext/date_time/compatibility.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-DateTime-to_time-for-pr
# Commit to gitgit add activesupport/lib/active_support/core_ext/date_time/compatibility.rbgit commit -m "better docs for DateTime#to_time"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-DateTime-to_time-for-pr
hub pull-request
# Celebrate!