aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorBogdan Gusiev <agresso@gmail.com>2013-11-05 10:08:16 +0200
committerBogdan Gusiev <agresso@gmail.com>2013-11-07 11:18:52 +0200
commit68bee763bf4a7e075e27ebc1c7be3897ee52913d (patch)
tree3c6a8f6465dd0e5d5d5060a2ee851fe7d8335327 /activesupport
parent026d0555685087845b74dd87a0417b5a164b1c13 (diff)
downloadrails-68bee763bf4a7e075e27ebc1c7be3897ee52913d.tar.gz
rails-68bee763bf4a7e075e27ebc1c7be3897ee52913d.tar.bz2
rails-68bee763bf4a7e075e27ebc1c7be3897ee52913d.zip
Fix AS::TimeWithZone#as_json docs
According to 28ab79d7c579fa1d76ac868be02b38b02818428a
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/time_with_zone.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb
index 95b9b8e5ae..50db7da9d9 100644
--- a/activesupport/lib/active_support/time_with_zone.rb
+++ b/activesupport/lib/active_support/time_with_zone.rb
@@ -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)