Sha256: 67734a849cf8fafad16960c2afa0d5aa8e05d982a77176573511b868f56be623

Contents?: true

Size: 364 Bytes

Versions: 25

Compression:

Stored size: 364 Bytes

Contents

class Time
  # Returns a JSON string representing the time.
  #
  # ==== Example:
  #   Time.utc(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")} #{formatted_offset(false)}")
    end
  end
end

Version data entries

25 entries across 25 versions & 7 rubygems

Version Path
activesupport-2.1.0 lib/active_support/json/encoders/time.rb
antfarm-0.3.0 rails/vendor/rails/activesupport/lib/active_support/json/encoders/time.rb
antfarm-0.4.0 rails/vendor/rails/activesupport/lib/active_support/json/encoders/time.rb
radiant-0.7.0 vendor/rails/activesupport/lib/active_support/json/encoders/time.rb
radiant-0.7.1 vendor/rails/activesupport/lib/active_support/json/encoders/time.rb