1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix AS::TimeWithZone#as_json docs

According to 28ab79d7c5
This commit is contained in:
Bogdan Gusiev 2013-11-05 10:08:16 +02:00
parent 026d055568
commit 68bee763bf

View file

@ -146,12 +146,12 @@ module ActiveSupport
# to +false+.
#
# # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = true
# Time.utc(2005,2,1,15,15,10).in_time_zone.to_json
# # => "2005-02-01T15:15:10Z"
# Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").to_json
# # => "2005-02-01T05:15:10.000-10:00"
#
# # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = false
# Time.utc(2005,2,1,15,15,10).in_time_zone.to_json
# # => "2005/02/01 15:15:10 +0000"
# Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").to_json
# # => "2005/02/01 05:15:10 -1000"
def as_json(options = nil)
if ActiveSupport::JSON::Encoding.use_standard_json_time_format
xmlschema(3)