mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
parent
026d055568
commit
68bee763bf
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue