Skip to content

Commit

Permalink
Time#as_json: use Time#formatted_offset instead of strftime %z direct…
Browse files Browse the repository at this point in the history
…ive, which is non-standard and inaccurate on some platforms (e.g., Mac OS X).

[#4979]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information
gbuesing authored and jeremy committed Jul 2, 2010
1 parent aeaa468 commit 227e1ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/json/encoding.rb
Expand Up @@ -212,7 +212,7 @@ def as_json(options = nil) #:nodoc:
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
Expand Down

0 comments on commit 227e1ca

Please sign in to comment.