diff options
Diffstat (limited to 'activesupport/lib/active_support')
3 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/json/encoders/date.rb b/activesupport/lib/active_support/json/encoders/date.rb index de59e1b338..853d9b868c 100644 --- a/activesupport/lib/active_support/json/encoders/date.rb +++ b/activesupport/lib/active_support/json/encoders/date.rb @@ -1,5 +1,5 @@ class Date def to_json(options = nil) #:nodoc: - %("#{strftime("%m/%d/%Y")}") + %("#{strftime("%Y/%m/%d")}") end end diff --git a/activesupport/lib/active_support/json/encoders/date_time.rb b/activesupport/lib/active_support/json/encoders/date_time.rb index 229cefc007..f0b0434412 100644 --- a/activesupport/lib/active_support/json/encoders/date_time.rb +++ b/activesupport/lib/active_support/json/encoders/date_time.rb @@ -1,5 +1,5 @@ class DateTime def to_json(options = nil) #:nodoc: - %("#{strftime("%m/%d/%Y %H:%M:%S %Z")}") + %("#{strftime("%Y/%m/%d %H:%M:%S %z")}") end end diff --git a/activesupport/lib/active_support/json/encoders/time.rb b/activesupport/lib/active_support/json/encoders/time.rb index b9b52be9ed..8eb9ff132e 100644 --- a/activesupport/lib/active_support/json/encoders/time.rb +++ b/activesupport/lib/active_support/json/encoders/time.rb @@ -1,5 +1,5 @@ class Time def to_json(options = nil) #:nodoc: - %("#{strftime("%m/%d/%Y %H:%M:%S %Z")}") + to_datetime.to_json(options) end end |