DateTime iso8601

DateTime.iso8601 ou to_json não retorna UTC com “Z”

ActiveSupport :: TimeWithZone tem alguns comportamentos interessantes.

require 'active_support/core_ext'
=> true

ActiveSupport.use_standard_json_time_format
=> true

DateTime.new(2013, 5, 28).to_json
=> ""2013-05-28T00:00:00+00:00""

DateTime.new(2013, 5, 28).in_time_zone('UTC').to_json
=> ""2013-05-28T00:00:00Z""""

ActiveSupport.use_standard_json_time_format = false
=> false

DateTime.new(2013