diff options
author | Geoff Buesing <gbuesing@gmail.com> | 2010-07-02 12:58:32 -0500 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-07-02 11:50:16 -0700 |
commit | 227e1caea51279fe4687f17e5704d637a21ea15f (patch) | |
tree | db4e1daadaf80f7932542971cda814715f4f728e /activesupport/lib/active_support/json | |
parent | aeaa4687ea5802089a99e0fd96b10ed5c463cd21 (diff) | |
download | rails-227e1caea51279fe4687f17e5704d637a21ea15f.tar.gz rails-227e1caea51279fe4687f17e5704d637a21ea15f.tar.bz2 rails-227e1caea51279fe4687f17e5704d637a21ea15f.zip |
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).
[#4979]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activesupport/lib/active_support/json')
-rw-r--r-- | 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 dbce7e710a..8ec3af3f50 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 |