Sha256: 6991519a9a6c1aadd06abf62536ad4ffa6f9dc86c7b5c4b450bd34a9e8a403d4

Contents?: true

Size: 349 Bytes

Versions: 20

Compression:

Stored size: 349 Bytes

Contents

class DateTime
  # Returns a JSON string representing the datetime.
  #
  # ==== Example:
  #   DateTime.civil(2005,2,1,15,15,10).to_json
  #   # => "2005/02/01 15:15:10 +0000"
  def to_json(options = nil)
    if ActiveSupport.use_standard_json_time_format
      xmlschema.inspect
    else
      strftime('"%Y/%m/%d %H:%M:%S %z"')
    end
  end
end

Version data entries

20 entries across 20 versions & 5 rubygems

Version Path
3mix-castronaut-0.5.0.2 vendor/activesupport/lib/active_support/json/encoders/date_time.rb
masover-castronaut-0.4.4.4 vendor/activesupport/lib/active_support/json/encoders/date_time.rb
masover-castronaut-0.4.4.5 vendor/activesupport/lib/active_support/json/encoders/date_time.rb
masover-castronaut-0.5.0.1 vendor/activesupport/lib/active_support/json/encoders/date_time.rb
relevance-castronaut-0.4.1 vendor/activesupport/lib/active_support/json/encoders/date_time.rb
relevance-castronaut-0.4.2 vendor/activesupport/lib/active_support/json/encoders/date_time.rb
relevance-castronaut-0.4.3 vendor/activesupport/lib/active_support/json/encoders/date_time.rb
relevance-castronaut-0.4.4 vendor/activesupport/lib/active_support/json/encoders/date_time.rb
relevance-castronaut-0.4.5 vendor/activesupport/lib/active_support/json/encoders/date_time.rb
relevance-castronaut-0.4.6 vendor/activesupport/lib/active_support/json/encoders/date_time.rb
relevance-castronaut-0.5.0 vendor/activesupport/lib/active_support/json/encoders/date_time.rb
relevance-castronaut-0.5.1 vendor/activesupport/lib/active_support/json/encoders/date_time.rb
relevance-castronaut-0.5.2 vendor/activesupport/lib/active_support/json/encoders/date_time.rb
relevance-castronaut-0.5.3 vendor/activesupport/lib/active_support/json/encoders/date_time.rb
relevance-castronaut-0.5.4 vendor/activesupport/lib/active_support/json/encoders/date_time.rb
radiant-0.7.2 vendor/rails/activesupport/lib/active_support/json/encoders/date_time.rb
activesupport-2.1.2 lib/active_support/json/encoders/date_time.rb
activesupport-2.1.1 lib/active_support/json/encoders/date_time.rb
radiant-0.7.0 vendor/rails/activesupport/lib/active_support/json/encoders/date_time.rb
radiant-0.7.1 vendor/rails/activesupport/lib/active_support/json/encoders/date_time.rb