This project is archived and is in readonly mode.
Time.parse has a ridiculous and incorrect fallback mode
-
knewter (at gmail)
holy moley I thought this was in ActiveSupport. A thousand apologies
-
Geoff Buesing
- State changed from new to invalid
- Tag changed from time.parse to time.parse
Yeah this is in Ruby core. Fortunately, this oddball behavior has been changed in the upcoming Ruby 1.9.2 release -- Time.parse will raise an ArgumentError if it can't parse a Time from a string.
For use right now: Time.zone.parse will just return nil if it can't parse a string, if that works for your needs.
-
knewter (at gmail)
Thanks a lot, that's fine behavior. :)