Permalink
Browse files

Merge pull request #12771 from bogdan/patch-1

Fix AS::TimeWithZone#as_json docs [ci skip]
  • Loading branch information...
2 parents 656d412 + 68bee76 commit 1dfe05f98eaa0b8067fa1dfd019d44c851879b22 @senny senny committed Nov 7, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 activesupport/lib/active_support/time_with_zone.rb
@@ -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)

0 comments on commit 1dfe05f

Please sign in to comment.