aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/time
diff options
context:
space:
mode:
authorZachary Zolton <zachary.zolton@gmail.com>2009-02-09 12:04:44 -0600
committerGeoff Buesing <gbuesing@gmail.com>2009-02-09 22:38:43 -0600
commit73c91429a18d4b8f083b504dc0829f737f718d44 (patch)
treef0d6d1804c9981f661feaacef0c0f910f9bca444 /activesupport/lib/active_support/core_ext/time
parent5c63be1f92edcd3ed60fae90b8eb129da19c5099 (diff)
downloadrails-73c91429a18d4b8f083b504dc0829f737f718d44.tar.gz
rails-73c91429a18d4b8f083b504dc0829f737f718d44.tar.bz2
rails-73c91429a18d4b8f083b504dc0829f737f718d44.zip
Time#to_s(:rfc822) uses #formatted_offset instead of unreliable and non-standard %z directive [#1899 state:resolved]
Diffstat (limited to 'activesupport/lib/active_support/core_ext/time')
-rw-r--r--activesupport/lib/active_support/core_ext/time/conversions.rb2
1 files changed, 1 insertions, 1 deletions
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: