aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/time_ext_test.rb
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/test/core_ext/time_ext_test.rb
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/test/core_ext/time_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/time_ext_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/time_ext_test.rb b/activesupport/test/core_ext/time_ext_test.rb
index 52d6c18dce..c0855520e8 100644
--- a/activesupport/test/core_ext/time_ext_test.rb
+++ b/activesupport/test/core_ext/time_ext_test.rb
@@ -461,6 +461,10 @@ class TimeExtCalculationsTest < Test::Unit::TestCase
with_env_tz "UTC" do
assert_equal "Mon, 21 Feb 2005 17:44:30 +0000", time.to_s(:rfc822)
end
+ with_env_tz "US/Central" do
+ assert_equal "Thu, 05 Feb 2009 14:30:05 -0600", Time.local(2009, 2, 5, 14, 30, 5).to_s(:rfc822)
+ assert_equal "Mon, 09 Jun 2008 04:05:01 -0500", Time.local(2008, 6, 9, 4, 5, 1).to_s(:rfc822)
+ end
end
def test_custom_date_format