diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2013-02-06 12:33:28 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2013-02-06 12:33:28 -0800 |
commit | c7598134a42406fc83d08cf44fa29fb46eeb2fe7 (patch) | |
tree | e0007645f384c0611fc45d3deb1da44bb26678ff /activesupport/lib | |
parent | f14dcc058e8a51d7456b34329d84c06676780f23 (diff) | |
parent | 28ab79d7c579fa1d76ac868be02b38b02818428a (diff) | |
download | rails-c7598134a42406fc83d08cf44fa29fb46eeb2fe7.tar.gz rails-c7598134a42406fc83d08cf44fa29fb46eeb2fe7.tar.bz2 rails-c7598134a42406fc83d08cf44fa29fb46eeb2fe7.zip |
Merge pull request #9128 from jamesotron/iso8601-sub-second-accuracy
Modify TimeWithZone#as_json to return 3DP of sub-second accuracy.
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/time_with_zone.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index ff13efa990..0e6d12a186 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -154,7 +154,7 @@ module ActiveSupport # # => "2005/02/01 15:15:10 +0000" def as_json(options = nil) if ActiveSupport::JSON::Encoding.use_standard_json_time_format - xmlschema + xmlschema(3) else %(#{time.strftime("%Y/%m/%d %H:%M:%S")} #{formatted_offset(false)}) end |