From a64d4e85e311edfcea79c777c6a184dc408c2f57 Mon Sep 17 00:00:00 2001 From: Ryan Glover Date: Thu, 7 Nov 2013 10:35:49 -0500 Subject: Standardize all JSON encoded times to use 3 decimal fractional seconds --- activesupport/lib/active_support/core_ext/object/json.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/core_ext/object/json.rb b/activesupport/lib/active_support/core_ext/object/json.rb index 7c8daebd3d..898c3f4307 100644 --- a/activesupport/lib/active_support/core_ext/object/json.rb +++ b/activesupport/lib/active_support/core_ext/object/json.rb @@ -180,7 +180,7 @@ end class Time def as_json(options = nil) #:nodoc: if ActiveSupport.use_standard_json_time_format - xmlschema + xmlschema(3) else %(#{strftime("%Y/%m/%d %H:%M:%S")} #{formatted_offset(false)}) end @@ -200,7 +200,7 @@ end class DateTime def as_json(options = nil) #:nodoc: if ActiveSupport.use_standard_json_time_format - xmlschema + xmlschema(3) else strftime('%Y/%m/%d %H:%M:%S %z') end -- cgit v1.2.3