Created
November 21, 2012 04:30
-
-
Save jamesgecko/4123029 to your computer and use it in GitHub Desktop.
TimeWithZone oddity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [49] pry(main)> a = Time.zone.now | |
| => Wed, 21 Nov 2012 04:28:07 UTC +00:00 | |
| [50] pry(main)> b = a.to_s | |
| => "2012-11-21 04:28:07 UTC" | |
| [51] pry(main)> c = Time.zone.parse(b) | |
| => Wed, 21 Nov 2012 04:28:07 UTC +00:00 | |
| [52] pry(main)> a == c | |
| => false | |
| [57] pry(main)> a.class | |
| => ActiveSupport::TimeWithZone | |
| [58] pry(main)> c.class | |
| => ActiveSupport::TimeWithZone |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment