Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix AS::TimeWithZone#as_json docs

According to 28ab79d
  • Loading branch information...
commit 68bee763bf4a7e075e27ebc1c7be3897ee52913d 1 parent 026d055
@bogdan bogdan authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 activesupport/lib/active_support/time_with_zone.rb
View
8 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)
Please sign in to comment.
Something went wrong with that request. Please try again.