Skip to content

Instantly share code, notes, and snippets.

Created November 19, 2015 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/c969eca9271f24580049 to your computer and use it in GitHub Desktop.
Save anonymous/c969eca9271f24580049 to your computer and use it in GitHub Desktop.
def test(date)
Time.utc(date) + (1000000000)
end
test(Time.utc(2011, 4, 25, 0, 0, 0))
TypeError: no implicit conversion of Time into Integer
But I can do this in irb
irb(main):002:0> Time.utc(2015, 11, 19, 0, 0, 0) + (1000000000)
=> 2047-07-28 01:46:40 UTC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment