rails/activesupport/lib
Andrew White 4974b1a483 Add ActiveSupport::TimeZone.iso8601 parsing method
Previously there was no way to get a ISO 8601 timestamp into a specific
timezone without either using `parse` or chaining methods. The new method
allows parsing directly into the timezone, e.g:

    >> Time.zone = "Hawaii"
    => "Hawaii"
    >> Time.zone.iso8601("1999-12-31T14:00:00Z")
    => Fri, 31 Dec 1999 14:00:00 HST -10:00

If the timestamp is a ISO 8601 date (YYYY-MM-DD) then the time is set
to midnight, e.g:

    >> Time.zone = "Hawaii"
    => "Hawaii"
    >> Time.zone.iso8601("1999-12-31")
    => Fri, 31 Dec 1999 00:00:00 HST -10:00

This new method has stricter semantics than the current `parse` method
and will raise an `ArgumentError` instead of returning nil, e.g:

    >> Time.zone = "Hawaii"
    => "Hawaii"
    >> Time.zone.iso8601("foobar")
    ArgumentError: invalid date
    >> Time.zone.parse("foobar")
    => nil
2017-03-03 21:53:12 +00:00
..
active_support Add ActiveSupport::TimeZone.iso8601 parsing method 2017-03-03 21:53:12 +00:00
active_support.rb deprecate halt_callback_chains_on_return_false instead of halt_and_display_warning_on_return_false 2017-02-08 17:18:55 +09:00