Module CouchRest::Model::CoreExtensions::TimeParsing
In: lib/couchrest/model/core_extensions/time_parsing.rb

Methods

Public Instance methods

Attemtps to parse a time string in ISO8601 format. If no match is found, the standard time parse will be used.

Times, unless provided with a time zone, are assumed to be in UTC.

Uses String#to_r on seconds portion to avoid rounding errors. Eg:

    Time.parse_iso8601("2014-12-11T16:54:54.549Z").as_json
     => "2014-12-11T16:54:54.548Z"

See: bugs.ruby-lang.org/issues/7829

[Validate]