rails

https://github.com/rails/rails

Ruby

Ruby on Rails

ActiveSupport::TimeWithZone#to_time

Returns an instance of +Time+, either with the same UTC offset
as +self+ or in the local system timezone depending on the setting
of +ActiveSupport.to_time_preserves_timezone+.

Source | Google | Stack overflow

Edit

git clone [email protected]:rails/rails.git

cd rails

open activesupport/lib/active_support/time_with_zone.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-ActiveSupport--TimeWithZone-to_time-for-pr


# Commit to git

git add activesupport/lib/active_support/time_with_zone.rbgit commit -m "better docs for ActiveSupport::TimeWithZone#to_time"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-ActiveSupport--TimeWithZone-to_time-for-pr

hub pull-request


# Celebrate!