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
3mix-castronaut-0.5.0.2 vendor/activesupport/lib/active_support/json/encoders/time.rb
masover-castronaut-0.4.4.4 vendor/activesupport/lib/active_support/json/encoders/time.rb
masover-castronaut-0.4.4.5 vendor/activesupport/lib/active_support/json/encoders/time.rb
masover-castronaut-0.5.0.1 vendor/activesupport/lib/active_support/json/encoders/time.rb
relevance-castronaut-0.4.1 vendor/activesupport/lib/active_support/json/encoders/time.rb
relevance-castronaut-0.4.2 vendor/activesupport/lib/active_support/json/encoders/time.rb
relevance-castronaut-0.4.3 vendor/activesupport/lib/active_support/json/encoders/time.rb
relevance-castronaut-0.4.4 vendor/activesupport/lib/active_support/json/encoders/time.rb
relevance-castronaut-0.4.5 vendor/activesupport/lib/active_support/json/encoders/time.rb
relevance-castronaut-0.4.6 vendor/activesupport/lib/active_support/json/encoders/time.rb
relevance-castronaut-0.5.0 vendor/activesupport/lib/active_support/json/encoders/time.rb
relevance-castronaut-0.5.1 vendor/activesupport/lib/active_support/json/encoders/time.rb
relevance-castronaut-0.5.2 vendor/activesupport/lib/active_support/json/encoders/time.rb
relevance-castronaut-0.5.3 vendor/activesupport/lib/active_support/json/encoders/time.rb
relevance-castronaut-0.5.4 vendor/activesupport/lib/active_support/json/encoders/time.rb
radiant-0.7.2 vendor/rails/activesupport/lib/active_support/json/encoders/time.rb
vibes-bj-1.2.2 spec/rails_root/vendor/rails/activesupport/lib/active_support/json/encoders/time.rb
vibes-bj-1.2.1 spec/rails_root/vendor/rails/activesupport/lib/active_support/json/encoders/time.rb
activesupport-2.1.2 lib/active_support/json/encoders/time.rb
activesupport-2.1.1 lib/active_support/json/encoders/time.rb