diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-11-07 01:22:32 -0800 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-11-07 01:22:32 -0800 |
commit | 1dfe05f98eaa0b8067fa1dfd019d44c851879b22 (patch) | |
tree | db6a14f4d72a70db008a7a69e5525b24ee17599e /activesupport/lib/active_support | |
parent | 656d412546cd97d5660c634c2a41c799d3f9e211 (diff) | |
parent | 68bee763bf4a7e075e27ebc1c7be3897ee52913d (diff) | |
download | rails-1dfe05f98eaa0b8067fa1dfd019d44c851879b22.tar.gz rails-1dfe05f98eaa0b8067fa1dfd019d44c851879b22.tar.bz2 rails-1dfe05f98eaa0b8067fa1dfd019d44c851879b22.zip |
Merge pull request #12771 from bogdan/patch-1
Fix AS::TimeWithZone#as_json docs [ci skip]
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/time_with_zone.rb | 8 |
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) |