sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

DateTime#utc

Adjusts DateTime to UTC by adding its offset value; offset is set to 0.

  DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24))     # => Mon, 21 Feb 2005 10:11:12 -0600
  DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 +0000

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/core_ext/date_time/calculations.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-DateTime-utc-for-pr


# Commit to git

git add app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/core_ext/date_time/calculations.rbgit commit -m "better docs for DateTime#utc"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-DateTime-utc-for-pr

hub pull-request


# Celebrate!