Skip to content

Instantly share code, notes, and snippets.

@t2
Created July 26, 2011 06:42
Show Gist options
  • Save t2/1106134 to your computer and use it in GitHub Desktop.
Save t2/1106134 to your computer and use it in GitHub Desktop.
Possible issue with Rails Time parsing?
$ rails console
#Loading development environment (Rails 3.1.0.rc4)
> a = Time.now # => 2011-07-26 01:37:59 -0500
> b = Time.parse(a.to_s) # => 2011-07-26 01:37:59 -0500
> a == b # => false
> c = a - b # => 0.653716
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment