From 73c91429a18d4b8f083b504dc0829f737f718d44 Mon Sep 17 00:00:00 2001 From: Zachary Zolton Date: Mon, 9 Feb 2009 12:04:44 -0600 Subject: Time#to_s(:rfc822) uses #formatted_offset instead of unreliable and non-standard %z directive [#1899 state:resolved] --- activesupport/lib/active_support/core_ext/time/conversions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/core_ext/time/conversions.rb b/activesupport/lib/active_support/core_ext/time/conversions.rb index f42be46770..e6f9134661 100644 --- a/activesupport/lib/active_support/core_ext/time/conversions.rb +++ b/activesupport/lib/active_support/core_ext/time/conversions.rb @@ -10,7 +10,7 @@ module ActiveSupport #:nodoc: :short => "%d %b %H:%M", :long => "%B %d, %Y %H:%M", :long_ordinal => lambda { |time| time.strftime("%B #{time.day.ordinalize}, %Y %H:%M") }, - :rfc822 => "%a, %d %b %Y %H:%M:%S %z" + :rfc822 => lambda { |time| time.strftime("%a, %d %b %Y %H:%M:%S #{time.formatted_offset(false)}") } } def self.included(base) #:nodoc: -- cgit v1.2.3