From 118e304edd1365938ec740bc568241196f2544e0 Mon Sep 17 00:00:00 2001 From: Geoff Buesing Date: Fri, 2 Jul 2010 12:58:32 -0500 Subject: [PATCH] Time#as_json: use Time#formatted_offset instead of strftime %z directive, which is non-standard and inaccurate on some platforms (e.g., Mac OS X). --- activesupport/lib/active_support/json/encoding.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/activesupport/lib/active_support/json/encoding.rb b/activesupport/lib/active_support/json/encoding.rb index dbce7e7..8ec3af3 100644 --- a/activesupport/lib/active_support/json/encoding.rb +++ b/activesupport/lib/active_support/json/encoding.rb @@ -212,7 +212,7 @@ class Time if ActiveSupport.use_standard_json_time_format xmlschema else - strftime("%Y/%m/%d %H:%M:%S %z") + %(#{strftime("%Y/%m/%d %H:%M:%S")} #{formatted_offset(false)}) end end end -- 1.7.1