Method: ActiveSupport::TimeWithZone#xmlschema
- Defined in:
- activesupport/lib/active_support/time_with_zone.rb
#xmlschema(fraction_digits = 0) ⇒ Object Also known as: iso8601, rfc3339
Returns a string of the object’s date and time in the ISO 8601 standard format.
Time.zone.now.xmlschema # => "2014-12-04T11:02:37-05:00"
148 149 150 |
# File 'activesupport/lib/active_support/time_with_zone.rb', line 148 def xmlschema(fraction_digits = 0) "#{time.strftime(PRECISIONS[fraction_digits.to_i])}#{formatted_offset(true, 'Z')}" end |