提交 68bee763 编写于 作者: B Bogdan Gusiev

Fix AS::TimeWithZone#as_json docs

According to 28ab79d7
上级 026d0555
......@@ -146,12 +146,12 @@ def xmlschema(fraction_digits = 0)
# 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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册